Hi all,
whats the proper way of pausing a game? ive tried a couple of things though i cant seem to NOT have the the menu pause with it. Ive had a good look around on the net though i cant seem to work it out.
using UnityEngine;
using System.Collections;
public class Pause : MonoBehaviour {
private bool isPaused = false;
public GameObject menu; // Assign in inspector
void Update ()
{
if (Input.GetButtonDown("Start"))
{
if (isPaused)
{
///PAUSED
Time.timeScale = 1;
isPaused = false;
}
else
{
//NOT PAUSED
Time.timeScale = 0;
isPaused = true;
}
}
menu.SetActive(isPaused);
}
}