Hi, I have a gameobject called Trees that have some trees inside, the probem is that it begins inactive or i can make it inactive with this code in c#:
if(Input.GetKeyUp(KeyCode.Space))
{
GameObject.Find("Trees").active = false;
}
I can disable, but i can’t activate it again using:
GameObject.Find("Trees").active = true;
I think unity don’t find the gameobject, is there a way to find it and activate it again.
Best regards