Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

How can I access object's children from other object?

$
0
0
Hi! I'm quite new to coding so maybe its a dumb question but I have a problem accessing child in different object than the one with the script. I have something like this: public class gameManagerScript : MonoBehaviour { public GameObject podsumowanieStatystyk; public void Potwierdzenie () { podsumowanieStatystyk.transform.GetChild (0).gameObject.SetActive (true); } } Of course I have the object dragged in space for podsumowanieStatystyk game object. Can you tell me what I did wrong here?

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>