Trying to dynamically build an interface, but when I add buttons through code their positions end up all messed up, I'm trying to add a button at position 0,52,0 on the current panel that the script is attached to like so:
GameObject newButton = NGUITools.AddChild(gameObject,buttonPrefab);
newButton
.transform.position = new Vector3
(0,
52,
0);
but for whatever reason the position ends up at a weird position like 11621, or 19967.5 depending on the resolution, but when I change it in the editor while it's running, the button goes to the position I want it to, is there a step I'm missing to not have the new button set to a weird position