Is there any way to make the cursor appear just when this scene begins?
Based on scenes with canvas I made the pause and loss menu But when I "lose" and it takes me to the scene that says "Game Over" I need the cursor to appear, but it does not, because it continues as if it were in the game itself. Is there any way to make the cursor appear just when this scene begins? Thank you.
Comment
https://docs.unity3d.com/ScriptReference/Cursor-visible.html
add the script any where in the scene.
When the scene load. the script will be called
Thank you, but didn't worked! :/
public void Resume ()
{
pause$$anonymous$$enuUI.SetActive(false);
Time.timeScale = 1F;
GameIsPaused = false;
**Cursor.visible = false;**
}
void Pause ()
{
pause$$anonymous$$enuUI.SetActive(true);
Time.timeScale = 0;
GameIsPaused = true;
**Cursor.visible = true;**
}
public void Load$$anonymous$$enu()
I'm trying to use that code, but just don't work... :/
Note that in CursorLock$$anonymous$$ode.Locked mode, the cursor is invisible regardless of the value of this property.