Parent
= (GameObject
)Instantiate
( ParentPrefab,
new Vector3
(0,
0,
0),Quaternion
.identity);Parent.transform.parent = UIRootPanel.transform;
Parent
.transform.localScale = new Vector3
(1
.0f,1
.0f,1
.0f
);Parent
.transform.localPosition = new Vector3
(0
.0f,0
.0f,0
.0f
);
GameObject child_1 = Parent.transform.FindChild("Child_1").gameObject; // sprite from atlas
child_1
.transform.localScale = new Vector3
(58
.0f, 64
.0f, 1
.0f
);child_1
.transform.localPosition = new Vector3
(0
.0f, 100
.0f, 1
.0f
);
GameObject child_2 = Parent.transform.FindChild("Child_2").gameObject; // sprite from atlas
child_2
.transform.localScale = new Vector3
(15
.0f, 64
.0f, 1
.0f
);child_2
.transform.localPosition = new Vector3
(58
.0f, 100
.0f, 1
.0f
);
GameObject child_3 = Parent.transform.FindChild("Child_3").gameObject; // sprite from atlas
child_3
.transform.localScale = new Vector3
(34
.0f, 64
.0f, 1
.0f
);child_3
.transform.localPosition = new Vector3
(73
.0f, 100
.0f, 1
.0f
);