Hello.
I want to make a script in c# for showing up, and hiding cursor while using esc. I made it, it’s hiding at first use, but don’t want to show up again.Why is that?
using UnityEngine;
using System.Collections;
public class Cursor : MonoBehaviour
{
void start()
{
Screen.showCursor = false;
}
void Update()
{
if ((Input.GetKeyUp (KeyCode.Escape)) && (Screen.showCursor=false))
Screen.showCursor = true;
else
{
if ((Input.GetKeyUp (KeyCode.Escape)) && (Screen.showCursor=true))
{
Screen.showCursor = false;
}
}
}
}