Activate a gameobject that is disabled c#

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#:

			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

Unity doesn’t find inactive game objects. Try creating a variable that holds the game object and use that to set the active bool.