how to instantiate as child unity code example
Example 1: how to instantiate as child unity
Instantiate(obj, pos, rot, parent);
Example 2: unity instantiate prefab as child
GameObject go = Instantiate(A, new Vector3 (0,0,0), Quaternion.identity) as GameObject;
go.transform.parent = GameObject.Find("Stage Scroll").transform;
Example 3: unity instantiate as child
var myNewSmoke = Instantiate (poisonSmoke, Vector3(transform.position.x,transform.position.y, transform.position.z) , Quaternion.identity);
myNewSmoke.transform.parent = gameObject.transform;