Gameobject.setactive Unity Code Example


Example 1: unity c# set gameobject active


gameObject.SetActive(true)

Example 2: unity enable gameobject


GameObject.Find("PlayMenu 3").SetActive(false);
// you could also store a GameObject as variable

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable