16
NGUI 3 Support / Re: Controlling UIPanels sizes
« on: December 13, 2013, 01:20:54 PM »
Thanks for replying ArenMook.
However I am still seeing my Menus being scaled after I have created them;
1) What I am seeing is when the prefab is instantiated, via NGUI.AddChild and attached to a anchor, it is as big as when I created it in my scene.
2) Then I run it through a class which scales it to a portion of the screen that I want it at.
3) Finally it seems that something is then scaling it again to be extremely small. The inspector states the scale of the prefab is 0.0133 when the code and maths should be re-sizing the prefab to the screen height.
I have tested the maths from our class which scales the prefab, and all of the maths seem to be correct. So I am not sure what is going wrong.
Also you mentioned that modifying the scale will make my prefab not have pixel-perfect coordinates, however the class lets me do this. So I was wondering if you could clarify exactly what you meant?
Thanks for your time.
However I am still seeing my Menus being scaled after I have created them;
1) What I am seeing is when the prefab is instantiated, via NGUI.AddChild and attached to a anchor, it is as big as when I created it in my scene.
2) Then I run it through a class which scales it to a portion of the screen that I want it at.
3) Finally it seems that something is then scaling it again to be extremely small. The inspector states the scale of the prefab is 0.0133 when the code and maths should be re-sizing the prefab to the screen height.
I have tested the maths from our class which scales the prefab, and all of the maths seem to be correct. So I am not sure what is going wrong.
Also you mentioned that modifying the scale will make my prefab not have pixel-perfect coordinates, however the class lets me do this. So I was wondering if you could clarify exactly what you meant?
Thanks for your time.