Enabling and Disabling components in Unity
Posted
by
Blue
on Game Development
See other posts from Game Development
or by Blue
Published on 2012-07-10T20:02:23Z
Indexed on
2012/07/10
21:25 UTC
Read the original article
Hit count: 206
unity
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?
© Game Development or respective owner