unity instantiate prefab
Instantiate(cube, Vector3 (x, y, 0), Quaternion.identity);
unity instantiate prefab
Instantiate(cube, Vector3 (x, y, 0), Quaternion.identity);
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;
unity create prefab with child
Add the original prefab into the scene, add the new prefab as a child to it,
then drag the original prefab back onto the prefab in the project view (or just
click Apply in the inspector)
Probably want to delete it from the scene after that
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us