using UnityEngine;
void Pause()
{
Time.timeScale = 0;
}
void Unpause()
{
Time.timeScale = 1;
}
Physics.autoSimulation = false;
void PauseGame ()
{
Time.timeScale = 0f;
AudioListener.pause = true;
}
void ResumeGame ()
{
Time.timeScale = 1;
AudioListener.pause = false;
}Copy
void PauseGame ()
{
Time.timeScale = 0;
}
void ResumeGame ()
{
Time.timeScale = 1;
}Copy