Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Wisteso on August 11, 2014, 10:18:14 PM

Title: 3.5.8 to 3.6.9 upgrade majorly glitches NGUI
Post by: Wisteso on August 11, 2014, 10:18:14 PM
Previously with 3.5.8, my NGUI component was working almost flawlessly. No real hacks in use.

However, upgrading to 3.6.9 has completely glitched the GUI. (Upgrade was done in a blank scene per instructions). Most of my panels are now way out of position in Play Mode, but look fine in Editor Mode before hitting play. Some of the issues I'm having are...


It's a mess and I dont see any hint of an idea why this happened in the release notes or documentation. My only idea is that the changes to anchors messed everything up. My GUI uses a ton of anchoring (OnEnable) and a few UIAnchors.

I've attached two screenshots taken from Scene View (since that's where the issue is most obvious). "Play Mode" layers the NGUI camera on top of the World camera, if that's not apparent from the screenshots.
Title: Re: 3.5.8 to 3.6.9 upgrade majorly glitches NGUI
Post by: Nicki on August 12, 2014, 02:17:07 AM
If you look in the advanced options on the UIPanels that you're anchoring to, if "Offset" is checked, the position of UIRoot counts. An offset of 20,20 will move your stuff 10 screens away. It works on the global position of the panel. Quick fix is to place UIRoot in 0,0,0.

Also take a look at your layers. NGUI finds its cameras by looking at which layer the widget/camera is in, (FindCameraForLayer), so if you're using default for everything things like this can happen depending on which camera is found first. Move your UI into its own layer (define a new one) and see if the problem persists.