Search code examples
unity-game-enginebuildcamera

Camera doesn't teleport correctly in build, but does in the editor


I'm making FNAF in unity, and in the editor, I can die and am jumpscared correctly. However, in the build, I'm looking at his feet. See the video below for more context.

Streamable Video

I honestly have no clue how to fix this.

I have no clue as to how to make a reproduceable example, since I don't know why it happens.


Solution

  • It's going to be an issue with your build settings or your assigned variables when you built the game.

    If the jumpscare is a separate scene, make sure it was included in the build and that the variable reference is set properly at the time of build.

    In response to your added info:

    Making a new scene should work, but since it is in the same scene already, some alternative options are