So me and my buddy are working on this game for a class project and we finished the BETA. The issue is that in the editor, the game runs perfectly fine, goes from level to level no problem. BUT in the actual build when you go to the menu, then the intro and get to the first level it goes horribly wrong like a bad horror movie. The screen kinda duplicates and you see the sky and the ground at the same time like something out of the twilight zone and you can’t see anything else. Why could this be happening? I’ve been trying to figure it out for days now.
Here is the first level running in the editor like a boss:
Sounds like your camera clear flags are set incorrectly, though I can’t think why this would happen in a build and not in the editor.
Have you written any editor scripts, or any code paths that run only or not in the editor? #if UNITY_EDITOR or if (Application.platform == …) or anything like that?
Nope I have not written any script of the sort. Been looking for a fix the whole day and I still can’t find my issue Idk why it works perfectly fine in editor but not in build.
If the clear flags are set to “don’t clear” and there’s nothing underneath the camera, then the background pixels are undefined, which typically results in different behavior in the editor and in builds (and in builds on different machines). Usually, “works one way in editor and another way in builds” problems are the result of relying on undefined behavior, assuming you haven’t explicitly programmed it that way of course.
ISSUE SOLVED. Problem was that I had an extra MouseLook floating around and it was in C#, don’t know how that happened but I deleted it and it fixed my issue