- Home /
Assets disappear when switching scenes
Everything works fine when the game starts, but when I, for example, go from Main Game screen to Pause screen and back again, textures, prefabs, etc are missing from the scene view. I read about this somewhere, but I can't remember where. Isn't there a check you can perform?
Answer by nameless323 · Nov 21, 2012 at 03:20 AM
all obgets on scene destroys when you switch level. you can save it using DontDestroyOnLoad() method or makin satic classes
Well, this does work, but it also does not disappear when I need it too. i.e. $$anonymous$$y main menu is transposed over the other scenes. I need to be able to switch scenes, but when I navigate back, my GUI elements and such should still be intact.
when you need to destroy some object (newer$$anonymous$$d GameObgect or it component) use Destroy() method. or you can use some bool flag to control renderer on gui. like void OnGUI() { if(flag) //render something, flag change}
Your answer
Follow this Question
Related Questions
Shadows Disappear When turning on Renderers 0 Answers
Is there a way to track the Progress or Status of UnloadUnusedAssets()? 0 Answers
Assets Disappearing 0 Answers
Objects Dont Display? 1 Answer
Compiled Asset Unpacking 0 Answers