Answers for "unity instantiate from child object"

C#
7

how to instantiate as child unity

Instantiate(obj, pos, rot, parent);
Posted by: Guest on January-04-2021
0

instantiate gameobject as child

// 1. create game object
// 2. set its transform.parent property
GameObject child = GameObject.Instantiate(MyPrefab);
child.transform.parent = this.gameObject.transform; //or whatever gameobj will be its parent
Posted by: Guest on April-21-2021

Code answers related to "unity instantiate from child object"

C# Answers by Framework

Browse Popular Code Answers by Language