- Home /
Level corrupted on build
I'm working on a game and I am trying to build it.I have never encountered this problem before, and I cannot figure out what the hell is going on. Basically I am using the Standard Assets Third Person Camera to control the camera when my character is on foot. If they get into a car, it switches to a Mouse orbit script. This works perfect in the editor and I am happy with the way it works.
However, in the standalone player, the camera is teleported inside the character, it always faces the same direction and it is very hard to control the game or figure out which way your going. But when you get into a car, it works fine. Then when you get back out, it breaks again. It happens across multiple scenes, and I have no explanation for it whatsoever.
I built the game as a development build, turned on script debugging, everything. And I found this:
Here's what actually happens:
It happens in multiple scenes (basically every scene with a player in it), and other scenes are completely unaffected. I saw some things saying it was caused by the #If UNITY_EDITOR tag, but I've never used it in my code and it's not in the code for the standard assets. Does anyone have any idea how to fix it?
Thanks, Romejanic