Enabling and Disabling components in Unity
- by Blue
I'm trying to create an enable/ disable game objects in Unity. I used GameObject.SetActiveRecursively but it only works one-way.
I used a collider in which when an object enters the collider. The game objects become enabled. When they leave or get to a certain point, they disable.
How would I make this a two way system, making it able to be enabled while inside the collider and disabled when outside the collider?
-- The collider is in the game object who is being disabled and enabled.
According to this information from Unity Answers, the object becomes disabled. So how would I make the object enabled?