Script problem again. Tried for almost a week on figuring this out. The script I have for the Pause Menu does everything it needs to do except for close the Pause Menu after I press escape again. Here it is:
#pragma strict
var Canvas : GameObject;
function Update () {
if(Input.GetKeyDown("escape")){
Canvas.SetActive(true);
Cursor.visible = true;
if(Time.timeScale == 1.0)
Time.timeScale = 0.0;
}
else if (Canvas.SetActive == true)
Cursor.visible = true;
if(Time.timeScale == 0.0)
{
if(Input.GetKeyDown("escape")){
Canvas.SetActive(false);
Cursor.visible = false;
if(Time.timeScale == 0.0)
Time.timeScale = 1.0;
}
}
}