Answers for "how to instantiate as child unity"

C#
6

how to instantiate as child unity

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

unity instantiate prefab as child

//Instantiate Object
     GameObject go = Instantiate(A, new Vector3 (0,0,0), Quaternion.identity) as GameObject;
     // Tranform as child
     go.transform.parent = GameObject.Find("Stage Scroll").transform;
Posted by: Guest on March-15-2020
0

unity instantiate as child

//SetParent() method
//https://docs.unity3d.com/ScriptReference/Transform.SetParent.html
//or something like this 
 var myNewSmoke = Instantiate (poisonSmoke, Vector3(transform.position.x,transform.position.y, transform.position.z) , Quaternion.identity);
   myNewSmoke.transform.parent = gameObject.transform;
Posted by: Guest on November-28-2020

Code answers related to "how to instantiate as child unity"

C# Answers by Framework

Browse Popular Code Answers by Language