Author Topic: loading new scene - old gui still up  (Read 7933 times)

judy3t

  • Guest
loading new scene - old gui still up
« on: April 15, 2012, 06:19:58 PM »
I tried deactivating the panel and then tried destroying the panel, both prior to Application.LoadLevel() and for some reason I cannot fathom, changing scenes leaves the gui from the previous scene up.  That just seems wrong. 

Even if it works as designed, is there a way to make it stop rendering? 


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: loading new scene - old gui still up
« Reply #1 on: April 15, 2012, 06:46:27 PM »
First question is -- are you using Unity 3.5.0? If so, update to 3.5.1 and see if it still happens. I have multiple scenes in Windward, and going from one to another doesn't leave the UI hanging around. The only way it would stick around would be if you marked the UI's root to be DontDestroyOnLoad.

judy3t

  • Guest
Re: loading new scene - old gui still up
« Reply #2 on: April 15, 2012, 07:46:15 PM »
Thanks for the fast response.  I'm using Unity 3.5.1f.  I have an empty game object not part of the UI which is don'tdestroyonload, but before posting I commented those lines out and still had the same problem.  Not sure why - everything is at its default settings.  I'm working around it for now but I'll keep playing with it periodically.  It could be my code.  That has been known to happen :-)

luizpericolo

  • Guest
Re: loading new scene - old gui still up
« Reply #3 on: April 29, 2012, 09:08:30 PM »
I've also come across the same problem. I'm sure I'm not using DontDestroyOnLoad().
My scene setup is pretty simple... Three buttons on the main menu scene, button message to a script that loads a new scene (a level select scene) when I click the "Play Game" button.

But the same thing happens. The NGUI elements of the supposedly destroyed level are still there. Nothing changed after upgrading to unity 3.5.1f

Cheers!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: loading new scene - old gui still up
« Reply #4 on: April 30, 2012, 03:07:19 AM »
If you can come up with a repro case, I'd appreciate it -- support at tasharen.com.

Keep in mind to only submit it if you're using the full version of NGUI. Free version may still have this issue.

luizpericolo

  • Guest
Re: loading new scene - old gui still up
« Reply #5 on: May 13, 2012, 09:59:41 AM »
The project can be found at:
LINK REMOVED

I'm using NGUI Pro, purchased during AssetStoreMadness this year!

Hope you can help me.

Cheers.

« Last Edit: May 13, 2012, 10:02:27 AM by ArenMook »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: loading new scene - old gui still up
« Reply #6 on: May 13, 2012, 10:02:42 AM »
Posting NGUI's source code in public? Smart.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: loading new scene - old gui still up
« Reply #7 on: May 13, 2012, 10:06:06 AM »
Also, you need to update your NGUI. 1.86 is very, very old. I can't support that.

VAMflax

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: loading new scene - old gui still up
« Reply #8 on: August 30, 2013, 02:42:32 AM »
I had this, and it was because I attached a Localization script directly to the UIRoot GameObject. Localization is set to not destroy on load. I moved it out to its own GameObject and all is working again.