Search Unity

Resetting Camera on Scene change/load

Discussion in 'Scripting' started by TheOneRaven, Dec 10, 2019.

  1. TheOneRaven

    TheOneRaven

    Joined:
    Oct 28, 2016
    Posts:
    15
    Hi there!
    In my project I have a scene where I use a custom camera. When the scene changes it seems that the camera from the new scene does not work because of the custom camera in the previous scene.

    How do I reset the camera when I enter a new scene?

    Thanks :)
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Hi,
    What do you exactly mean with "when the scene changes"? Do you load a new scene additively or have the custom camera as some sort of singleton/DontDestroy, which stays persistent in your game/app? And if you haven't done that intentionally, check if you have some scripts in your camera that prevent it from being destroyed as the camera should be destroyed just the same as the other objects in the scene that was unloaded.