- Home /
BackGround of Last Scene Visible in New Loaded Scene. How to Fix?
Hello Developers,
I stuck in a problem. I have 2 scenes in my unity project. Player start with loading the scene 1 as usual and there is a button to click and load scene 2. But when scene2 is getting loaded the background of last scene still visible in the new loaded scene. I can't figure out Why this is happening. Please help me.
Thanks and Regards Niraj Vishwakarma
@$$anonymous$$larax: What to destroy, entire scene?
@revolute: I am using LoadLevelAsync();
AsyncOperation async = Application.LoadLevelAsync(5);
Answer by smoggach · Aug 27, 2014 at 01:32 PM
Maybe it's one of these:
1) New levels are loaded at 0,0,0. If you are loading additively and you don't want the new scene to appear over the old one, you can move the current scene along with the camera off to one side while it loads, then back again.
2) Layers, Sorting Layers, and Sorting Order. Even though they are two different scenes they still exist in the same world. That means if you have something in the first level with a higher layer than something on the second level it will be displayed in front.
@smoggach: I see, let me try with your suggestion and i am definitely get back with feedback. Thanks.
OH, it's because you're using LoadLevelAsync. It's loading one part at a time while it also updates the current scene. You can fix your problem by simply moving your current scene off to one side while it does this.
@smoggach, Ohh Let me try it, i will let you know for sure :)
Answer by niraj · Aug 30, 2014 at 02:04 PM
@Klarax and @smoggach : Thank you very much for you kind suggestions. What i simply did, i destroyed the background object since it was just a plane. So i just destroyed the background plane before loading the next scene.
Thanks and Regards Niraj Vishwakarma