hi!
i made a prefab with one sliced sprite and few labels. position and rotation is at zero while scale is at 1,1,1
i instantiate prefab and made it child of a panel but scale goes to 360,360,360 and position goes to some weird number like 100800,56000,0
scales leading to widgets are all 1,1,1 except the root.
root
-camera
-anchor
-panel
-widget
when i place the widget in the editor i get correct position and scale, doing it from the code it messes everything up.
here is the code i am using:
e
= GameObject
.Instantiate(element,
new Vector3
(0f
+ 40 * x_index,0f
+ 40 * y_index, 0f
),Quaternion
.identity) as GameObject
; e.transform.parent = Panel.transform;
any help appreciated!