Pause Menu in Multiplayer Game ?

Hello everyone !
I'm currently making the multiplayer part of a game and I came across a problem: I have to make a pause menu appear when the Escape button is pressed. However, when I click on this button the canvas appears but my player's eyes still follow my mouse and I can still walk, is there any way to disable the scripts of the player ?

Comments

  • Hi, in pause menu your cursor is unlocked, right?
    So you can simply check your cursor state.
    In your movement and mouselook scripts you can add something like:
    if(Cursor.lockState == CursorLockMode.None) return;