There is no visible cursor when i press Esc and the PauseMenu appears. Should I post the script here? It’s quite long, but it’s the one you can find in the Unity online script database.
1 Answer
1Check if you have a script anywhere that hides the mouse, like the center cursor function does. If so simply change the value of that script when entering the pause menu (that is how i do it).
var yourCursor : Texture2D; // Your cursor texture var cursorSizeX : int = 16; // Your cursor size x var cursorSizeY : int = 16; // Your cursor size y function Start() { Screen.showCursor = false; } function OnGUI() { GUI.DrawTexture (Rect(Event.current.mousePosition.x-cursorSizeX/2, Event.current.mousePosition.y-cursorSizeY/2, cursorSizeX, cursorSizeY), yourCursor); } This is my CUSTOM CURSOR script, that I wish to include to the Pause Menu script for it to shop only when game is paused [Esc key down]
– AttilaZoldAll right, so my PauseMenu variable is not declared in the PauseMenu scrip from Unity database. I added your update function to my CustomCursor script, but it doesn't identify the 'PauseMenu'
– AttilaZold