- Home /
Application.LoadLevel strange problem
Hello again guys.
I'm having a very strange problem with changing scenes in Unity. We have a trigger that shows a texture for 3 seconds then loads the next scene. The texture shows up on screen fine, but after 3 seconds, the scene that is loaded looks as though it's a very strange mashup of the previous scene and the new scene. Not only that, when the player moves, it leaves an image trail on the screen. I don't know what code to post, because I can't even begin to imagine where the problem is. I'll be happy to post some of the code though if you need it.
P.S. I'm not using Object.DontDestroyOnLoad at all.
Thanks for the help
Update: It seems that the problem had something to do with the skybox used o.O. $$anonymous$$akes no sense to me, but as soon as I really understand what's going on. I'll post an answer.
I know this is an ancient post, but did you ever figure out what was going on with that? I have the same crap going on in my game when porting to Windows Store.
Answer by Bunny83 · Jun 25, 2011 at 08:19 PM
Well, that's what i would have suggested :D It seems your camera in your new scene doesn't clear the color / depth - buffer. Check the clearFlags on your camera.
Answer by Biendeo · Jun 25, 2011 at 09:03 PM
Basically, I think that your problem is the camera's Clear Flag setting. The camera stores all the colour information it gets, and the Clear Flag setting chooses what it keeps. There are 4 settings for this option.
Skybox - Allows the skybox to work
Solid Colour - Forces a colour to the background
Depth Only - Allows objects to appear in front of everything all the time (such as a gun in an FPS)
Don't Clear - Does not remove any information between frames, thus giving that effect.
Now, if you have multiple cameras, you can set different settings to get different effects.
However, if you're saying the skybox itself was the problem, check to see if your skybox doesn't have any transparent pixels in it, because that may mess up the camera.
If all else fails, try making a new skybox with the same materials, and then just replacing it. That happened to me before.
Hopefully this works.
-Biendeo
Your answer
Follow this Question
Related Questions
Load Level in background and load it when key is pressed 2 Answers
Click Object to change scene 2 Answers
Levels, stages, scenes 0 Answers