if object A is a child of object B and B have script on it,
how can i SetActive object A in this script.
i tried
A = GameObject.Find (“A”);
A.SetActive (false);
but it is not working and i have nullReference error
if object A is a child of object B and B have script on it,
how can i SetActive object A in this script.
i tried
A = GameObject.Find (“A”);
A.SetActive (false);
but it is not working and i have nullReference error
well there are two methods for this
if(A != null){ A.setActive(false);}
A = B.transform.getchild(the index at which gameobject is child); and then A.setActive(false);