Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: dominus85 on August 01, 2014, 06:24:23 AM
-
I have upgraded NGUI until now without any big issues
However, after making the update from 3.6.4 to the latest 275c7bb51c8d9d50f3d620c1f028c558aee61bcf commit (version 3.6.8) the anchors and widgets went crazy
I have 2 UIRoots in 2 different scenes -> preloader + game
Preloader loads the game scene
Now, it appears that all the anchors from the game scene went crazy..
Content is my panel that is the first child of the UICamera which is the child of UIRoot
This is how an anchor looks in editor: https://www.dropbox.com/s/do1wvwt8lcy78an/Screenshot%202014-08-01%2014.18.38.png
In the editor, after the scene is loaded: https://www.dropbox.com/s/vpz918sdv848rgk/Screenshot%202014-08-01%2014.21.50.png
In the editor, after the scene is loaded(zoomed out a lot): https://www.dropbox.com/s/68sqnrr9kzfewp6/Screenshot%202014-08-01%2014.21.31.png
If I remove the anchor reference and add it again, the anchors appear to have recovered(pointing to the middle of the screen): https://www.dropbox.com/s/623pl8rxl2rw5wc/Screenshot%202014-08-01%2014.22.54.png
Can you please let me know at how I should try and deal with the problem?
Thanks
-
We are experiencing horrible problems with our anchors as well.
Our update was 3.6.0 to 3.6.8, iirc.
Looks to be very similar to what dominus85 is seeing.
-
2 UIRoots generally also implies 2 UI cameras, which is a questionable practice. It likely finds the wrong camera. Try parenting your UI to the correct camera from the start. If that doesn't fix it, I would appreciate steps to reproduce so that I can investigate.
-
Thanks for the feedback, Michael.
We wound up reverting back to 3.6.0 as the easiest short term solution, and I haven't had a chance to test it any further yet. Will try to remember to check back in here with more info when that happens . . .
FWIW - I've been using multiple UIRoots with multiple UICameras to implement different sections of a UI since I first started working with NGUI, and have never noticed any trouble with it until now. I was under the impression that the culling mask and event mask settings made that okay, and never realized it was a questionable practice.
And now that I think of it, we just added a third party minimap plug-in that features NGUI integration, and the plugin uses its own UIRoot and UICamera as well. So it seems like maybe it would be a good thing for multiple UICameras to continue to play nice together going forward. Will get you some more information towards helping to make that the case, as soon as time allows.
-
Assuming they all use their own layer, it's fine. I meant it's not a good idea to have different UIRoots if they are all sharing the same camera.