camera won't move when loading another scene

Hi everyone,

In my project I have a camera that moves over a playfield. However when i load a different scene (gamescene) the camera won’t move anymore. The camera in set to “not destroy on load” and the camera in the gamescene is removed because I dont need it anyway.

In console I tested if the move script is activated in the gamescene and it is but the camera just wont move.

Here is the camera move scipt;

                if (mouseY > treshY) { //maak eventueel van 0.27f een vaste waarde net zoals je x hebt berekent met panel (centerPan)
                    Debug.Log("UP");
                    thisCam.transform.Translate (Vector3.up * 10f * Time.deltaTime);

                }

                if (mouseY < -treshY) {
                    Debug.Log("DOWN");
                    Camera.main.transform.Translate (Vector3.down * 10f * Time.deltaTime);

                }

Maybe you need to reset mouseY, or where it is coming from?
Try printing out the mouseY and thresY values with Debug.Log to see whats happening…

Thats what I did and nothing unusual comes out as the debug.log gives me “UP” and “DOWN” so the line of code gets excecuted but the cam just won’t move.

My guess is that it has something to do with me changing scenes and that that somehow affects the camera.

If anyone has any idea what could be the issue that would be greatly apreciated.