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

Parenting object after using new GameObject

$
0
0
Could someone tell me why this does not parent GridParent to Game please? Many thanks in advance. using UnityEngine; using System.Collections; public class Grid : MonoBehaviour { private GameObject m_GridParent; public void GirdCreate () { m_GridParent = new GameObject ("GridParent"); m_GridParent.transform.parent = GameObject.Find("Game").transform; } I also tried: GameObject.Find("GridParent").transform.parent = GameObject.Find("Game").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>