I have a script with MouseLook, which is only in my game- scenes attached to the camera, but if I press "esc" and change to my Pause- Menu MouseLook is still activated, although the script is nowhere in the pause-scene and I can't use my mouse.
I change my scene with
public void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
SceneManager.LoadScene("Menu");
}
}
And a different script "MouseLook" manages the Mouselook. How can I solve this?
I tried already in the MouseLook Script following:
void Update(){
if (sceneName == "Game-Scene"){
MouseLook;
...
}
else {
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
}
in order to use the mouse again you will need to unlock the cursor. this video will show you what you need in four minutes. unfortunately since your already using a script you will need to modify it, instead of creating your own, however, if it is the mouselook script that comes with the character prefab in the standard asset pack, go into your scene, click the character and expand the script from the inspector, and you should find a variable called mouseLOCK. accessing this via the code for your pause menu should release the mouselock and give you a cursor.