Quantcast
Viewing all articles
Browse latest Browse all 108

No Parent?

I have a Object called "Planet(clone)" (clone because its get instantiated) and it has a child called GravRad! var lol; function OnTriggerEnter(gr : Collider){ if(gr.transform.gameObject.name == "GravRad"){ gr.transform.parent.gameObject.name == lol; Debug.Log(lol); } However in the console it says null but it has a parent in the hierarchy! oh and i have set trigger enter on and i tested without a parent and it works (so the only thing that is not working is the gr.transform.parent.gameObject.name == lol;

Viewing all articles
Browse latest Browse all 108

Trending Articles



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