Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mahewitt on August 25, 2014, 02:58:31 PM
-
Hi.
After upgrade from 3.6.8 my design time view seems messed up (things are ok run time).
Previously I worked from within the small camera area you see at the top of the scene view. If things are fixed position they appear fine in game view (the 3 big panels and debug buttons). There is a button top left and text that now however appear minute in game view (design mode) that use anchors to their parent panel for position. These appear fine however when running the game.
Any ideas how to fix this? Previously the panel was overlaid and sized to the NGUI camera in design mode also but that now doesn't seem to be the case.
Thanks,
Mark
-
I assume you mean "handles" when you say "anchors", as they are very different things. Handles are those things you see in the scene view that you can drag around. Anchors are used to position widgets, and show up as yellow dots/lines, which I don't see in your screenshot.
What's your panel's position? Where is the UI camera located in the hierarchy? It needs to be a child of the UIRoot.
-
Thanks for the reply.
Probably need to rephrase a bit. In the picture the NGUI camera is on the small collection of objects at the top, . The 'pink' rectangle seems to be positioned over the main camera (on different Layers) and the UIRoot dimensions (Flexible, min 1080, max 1536). Before upgrading this was overlaid the NGUI camera and seemed to use the game window size. Before the tiny button (top left of game scene) appeared the same as the 3 absolute positioned buttons (not using anchors).
It all works out correctly runtime, but makes things tricky when setting up the gui in design mode.
Camera is child of UIRoot, UI Root is positioned at 0,20. Pink rectangle seems centered on 0,0.
Any ideas?
-
Either center your UIRoot or check the Offset in the offending panels. Panel offset uses the global offset, so should work wherever.
Generally, it's advised to keep it centered on Origin (0,0,0) though.
-
Make sure your UI camera is underneath your UIRoot. Move the UIRoot, not some child panel.
-
Layout should be ok. Only UIRoot is offset. NGUI Camera and Panel nested under UIRoot.
I did a simple test and duplicated the offending Panel and surprisingly that seems to behave correctly. All settings (Transform etc) look the same on both. If you see the new screen shot you see the original and duplicates where the latter is how things were before the upgrade.
Is there some 'hidden' setup that defines how these are placed (that I can perhaps update somehow). I possibly have a workaround now based on the above however to get the GUI back as it was.
Thanks :)
-
Off the top of my head and being away from my workstation I can't think of anything. How come the pic shows two completely different pink/purple outlines though? One is much smaller than the other. Are the scales of your panels not (1, 1, 1), or UICamera ortho size is not 1?