Documentation

Page contents

Updated

Generate PDF from page.

Object Destroyer Behavior

Files: CGFObjectDestroyerBehavior.cs

Path: "CGF/Systems/ObjectTransform"

Description

Behavior that allows the associated GameObject to destroy or disable itself.

Reference

  • Action – Selected start action.
    • Destroy – Destroys the GameObject.
    • Disable – Disables the GameObject.
  • Automatic – Enables or disables automatic behavior startup.
  • Camera – Manages camera settings. See Common Features / Camera.
  • Delay – Initial delay of the behavior action.
  • Mode – Selected startup modes for the behavior action.
    • Distance – Copy creation according to the distance between the original GameObject or the last copy and the copy to create.
    • Time – Creation of copies according to the elapsed time between the appearance of the original GameObject or the last copy and the copy to create.
  • Reference Camera – Camera reference assigned through the inspector.
  • Special Effect List – Instantiation of the CGFVFXInstantiatorClass class. See Common Features / Special Effect List.
  • Target Game Object – Selected GameObject to which the action is applied.
    • This Object – Selects the this object option.
    • Direct Parent – Selects the direct parent option.
    • Hierarchy Parent – Selects the hierarchy parent option.
  • Time – Time that must elapse to start the behavior action.

Use

Add this component to the GameObject that should own the behavior.
Configure the inspector fields listed in Reference and assign the required scene or asset references before entering Play Mode.