My Mouse Cursor is locked in certain scenes

In my Player Camera Controller script i have a function to lock my mouse in my “Game” Scene:
Cursor.lockState = CursorLockMode.Locked;

But when i start at the Menu scene it is locked too, while i don’t have anything calling that in that scene.

Does anyone knows a solution?

Perhaps just run the line Cursor.lockState = CursorLockMode.None; in the main menu? Maybe the lock state carries over from the previous scene, but I don’t know.

This worked for me. Thanks ahsen35813