Author Topic: Strange panel alignment behavior; Panels often don't line up with parent cameras  (Read 2359 times)

charliehelman

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 16
    • View Profile
Hi Aren,

Since upgrading from 3.0.8 to 3.7.6, we've started seeing problems where our UI doesn't show up on screen. Looking in scene view, panels simply aren't correctly lined up with our UI cameras.

The symptom looks like this, in a fresh scene (note, in a fresh project with only nGUI imported, I couldn't reproduce the issue).


In our project, it looks like this:


As you can see, something is very wrong.

Weirdly enough, restarting Unity *sometimes* fixes the issue. Sometimes it doesn't, though. And when it seems fixed, later on it breaks again for reasons I can't seem to understand.

Based on the symptoms, do you have any ideas about how I might go about fixing this problem?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
1. Check the position of your UIRoot.
2. Make sure that only one camera can draw the UI.

charliehelman

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 16
    • View Profile
1. Check the position of your UIRoot.
2. Make sure that only one camera can draw the UI.

1. UIRoot is at 0,0,0
2. This happens even in a fresh scene with only a fresh-made UI. Still, I verified that in all cases where I've seen it, only one camera can draw the UI.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
What version of Unity are you using? Based on that background I'm guessing some Unity 5 beta version. Which one?

charliehelman

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 16
    • View Profile
Beta 13, at the moment. We observed this in Beta 12 also; in fact it seemed fixed for a day or so after we upgraded to Beta 13.

Edit2: Nevermind. Re-serializing Assets popup does not guarantee a fix. And the same prefabs I said were fixed are broken again when I drag them into any scene. (Note the prefabs include everything, including the UIRoot)

Can I do anything else to help clarify the issue? If it's a unity bug I'll do what I can to get it reported and reproable.

This just seemed to fix itself (probably temporarily) when I closed Unity and restarted it, and was then presented with a popup window that said something about re-serializing assets (I think).

I've restarted Unity many times and had that not solve the issue, however. Maybe the re-serialization thing is a clue?

Unfortunately I'm not currently sure how to break it, or fix it. It just, does. :-/

Edit: Definitely worth noting that restarting unity only fixes for UIPrefabs currently in the scene. Applying changes to the prefab and saving the scene seems to make the fix stick (at least temporarily). However, I still see the problem with other prefabs, whether I drag them in to the same scene or if I encounter them normally at runtime.
« Last Edit: November 21, 2014, 09:37:35 PM by charliehelman »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
I just installed Unity 5 beta 14 and imported NGUI. All examples work, creating new UI works, everything works... how do I reproduce your issue?