So I have a Pause Menu and for my resume button I have the following code:
(fps.GetComponent("MouseLook") as MonoBehaviour).enabled = true;
pauseCanvas.enabled= false;
Time.timeScale = 1;
Screen.lockCursor = true;
Cursor.visible = false;
But once I try to click on the resume button during runtime, the game does not resume.
The pause menu is attached to canvas whereas the script of the pause menu is on the main object. and I have an eventsystem and graphic raycaster on my canvas. What could be wrong?