This is my code. MouseLook is the class that I want to set Enabled from, Enabled is a bool.
if (Input.GetKeyDown (KeyCode.Escape)) {
Paused = !Paused;
if (Paused) {
MouseLook.Enabled = false;
Time.timeScale = 1;
NGUITools.SetActive (PauseMenu, false);
}
if (!Paused) {
MouseLook.Enabled = true;
Time.timeScale = 0;
NGUITools.SetActive (PauseMenu, true);
}
}
↧