Author Topic: Upgrade Unity to 4.5.3 and NGUI to 3.7.1 problem  (Read 4734 times)

Andresfdezb

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 23
    • View Profile
Upgrade Unity to 4.5.3 and NGUI to 3.7.1 problem
« on: September 22, 2014, 05:56:30 AM »
Hi there. I have a slightly similar problem to some other question I found here, but not quite the same. I was working with Unity v4.3.4 + NGUI 3.7.1 and I updated Unity to 4.5.3. I opened an existing project and followed the steps to upgrade NGUI (I didn't upgrade NGUI to a newer version, but I thought there would be problems, so a clean start would fit nice).

It all starts nice (no compiler errors, and everything seems perfect). The problem comes after I play the scene, when I exit play mode the UI rotates and scales in a really crazy way (messing the whole UI). I've attached 3 screenshots to ilustrate it. The first screenshot shows the UI right before entering play mode (everything looks normal even during play mode). The second shows the same view of the scene but after I exit play mode (looks like the UI I created has disappeared or changved). But if I scroll away from the scene it shows that the UI has changed (third screenshot) and looks like has scaled and rotated to fit some camera. If I want to come back to normal so I can edit the UI, I need to delete NGUI and reimport it again.

I can't figure out what maybe causing this. I haven't changed anything in the scene and I imported NGUI following the instructions (and actually works perfectly untill I exit play mode). Any Ideas?

Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrade Unity to 4.5.3 and NGUI to 3.7.1 problem
« Reply #1 on: September 22, 2014, 10:27:07 AM »
You need to make sure that only one camera can see the UI layer -- your UI camera.

Your main camera can likely see it, which is what's causing your issues.

Andresfdezb

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Upgrade Unity to 4.5.3 and NGUI to 3.7.1 problem
« Reply #2 on: September 23, 2014, 01:33:07 AM »
You need to make sure that only one camera can see the UI layer -- your UI camera.

Your main camera can likely see it, which is what's causing your issues.

Oh boy, I'm so sorry. You're right, the culling mask of the main camera had the UI layer on... The worst part is that I even knew that the UI scaled to fit another camera, but as I thought the main camera settings were right I didn't even check it. Sorry.

Thanks for the fast response.