EnableObjectAction - CodingDino/Dino-Unity-Toolkit GitHub Wiki

The EnableObjectAction component enables or disables a GameObject. This could be used for many aspects of game logic, such as turning on and off different types of movement, disabling and enabling game controls, or temporarily turning off and on parts of the game level such as doors.

This is an Action component, and therefore must be triggered by a separate Activator component. Actions, Activators, and Data make up the core system for the Dino Unity Toolkit.

Image: EnableObjectAction attached to a patrolling enemy. The action is used to disable one direction movement and enable the other direction when the enemy reaches an edge.

Actions

This component has several Action functions that can be triggered by Activators.

ActionEnableObject()

This action enables the provided GameObject, turning back on all its activators and Unity components such as renderers - provided they were not individually disabled.

Parameter: Description:
To Enable The GameObject that should be enabled.

ActionDisableObject()

This action disables the provided GameObject, turning off all its activators and Unity components such as renderers.

Parameter: Description:
To Disable The GameObject that should be disabled.