Hello Guest

Author Topic: Application.LoadLevel keeps the UI on the screen, why?  (Read 4107 times)

DoubleElite

  • Newbie
  • *
  • Posts: 2
    • View Profile
Application.LoadLevel keeps the UI on the screen, why?
« 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?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Application.LoadLevel keeps the UI on the screen, why?
« Reply #1 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...

DoubleElite

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Application.LoadLevel keeps the UI on the screen, why?
« Reply #2 on: September 18, 2013, 05:51:49 pm »
... Whoops :P

Thanks for the quick response! Appreciate it!