Hello, I have this script here and I don’t know how to add in to disable the mouselook function while I am paused (essentially bringing up the pause menu) Thanks!
using UnityEngine;
using System.Collections;
public class GUIMenu : MonoBehaviour
{
bool paused;
void Update()
{
if (Input.GetKey(KeyCode.Escape))
{
Time.timeScale = 0.0f;
paused = true;
}
}
void OnGUI()
{
if (paused)
{
GUI.Box(new Rect(850,350,120,200), "Paused");
if (GUI.Button(new Rect(860,375,100,20), "Resume"))
{
Time.timeScale = 1.0f;
paused = false;
}
if (GUI.Button(new Rect(860,400,100,20), "Options"))
{
Time.timeScale = 1.0f;
paused = false;
}
}
}
}