Author Topic: 364 -> 368 upgrade messes up anchors  (Read 7881 times)

dominus85

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 31
    • View Profile
364 -> 368 upgrade messes up anchors
« 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

JumpCore

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: 364 -> 368 upgrade messes up anchors
« Reply #1 on: August 01, 2014, 04:22:23 PM »
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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 364 -> 368 upgrade messes up anchors
« Reply #2 on: August 01, 2014, 09:22:21 PM »
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.

JumpCore

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: 364 -> 368 upgrade messes up anchors
« Reply #3 on: August 06, 2014, 06:42:54 PM »
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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 364 -> 368 upgrade messes up anchors
« Reply #4 on: August 07, 2014, 03:02:21 AM »
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.