Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: judy3t on April 15, 2012, 06:19:58 PM

Title: loading new scene - old gui still up
Post by: judy3t 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? 

Title: Re: loading new scene - old gui still up
Post by: ArenMook 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 (http://www.tasharen.com/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.
Title: Re: loading new scene - old gui still up
Post by: judy3t 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 :-)
Title: Re: loading new scene - old gui still up
Post by: luizpericolo 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!
Title: Re: loading new scene - old gui still up
Post by: ArenMook 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.
Title: Re: loading new scene - old gui still up
Post by: luizpericolo 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.

Title: Re: loading new scene - old gui still up
Post by: ArenMook on May 13, 2012, 10:02:42 AM
Posting NGUI's source code in public? Smart.
Title: Re: loading new scene - old gui still up
Post by: ArenMook 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.
Title: Re: loading new scene - old gui still up
Post by: VAMflax 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.