2D Toolkit Forum

2D Toolkit => Support => Topic started by: DoubleElite on September 18, 2013, 05:35:38 pm

Title: Application.LoadLevel keeps the UI on the screen, why?
Post by: DoubleElite on September 18, 2013, 05:35:38 pm
I have my level selection screen made with TK2D UI, and I'm just using Unity's LoadLevel method to load the selected level. But that method is supposed to get rid of everything in the scene and replace it with a new scene, however in my case it brings over the UI into the next scene.

Why is this? And how can I prevent it? Would my best bet to be to deactivate the tk2duimanager object before loading the level?
Title: Re: Application.LoadLevel keeps the UI on the screen, why?
Post by: unikronsoftware on September 18, 2013, 05:43:50 pm
Have you made your UI the child of the uiManager? The UI Manager is meant to be persistent, so if you create child objects to that, they won't get deleted. Just don't make them a child of tk2dUIManager and that should be fine...
Title: Re: Application.LoadLevel keeps the UI on the screen, why?
Post by: DoubleElite on September 18, 2013, 05:51:49 pm
... Whoops :P

Thanks for the quick response! Appreciate it!