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

Why is transform.parent not working in Unity 5.5.4?

$
0
0
Can anyone please tell me what's wrong in my code. I have spent last 3 hours searching for the issue. It seems like it works for everyone but me. public class FollowYou : MonoBehaviour { GameObject followThis; void Start(){ followThis = (GameObject) GameObject.Find("activePlayer"); transform.parent = followThis.transform; } }

Viewing all articles
Browse latest Browse all 302

Trending Articles



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