public GameObject pauseScreen;
bool off = false;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if (off == false)
{
pauseScreen.SetActive(false);
if (Input.GetKeyDown (KeyCode.P))
{
//wait here
off = true;
}
}
if (off == true)
{
pauseScreen.SetActive(true);
if (Input.GetKeyDown (KeyCode.P))
{
//wait here
off = false;
}
}
}
how would i do it so that it waits a second at the “//wait here” so it doesnt activate and then instantly deactivate the pause screen
P.S. im using unity 2017.3