unity pause through script code example
Example: how to pause your game unity
using UnityEngine;
void Pause()
{
Time.timeScale = 0;
}
void Unpause()
{
Time.timeScale = 1;
}
using UnityEngine;
void Pause()
{
Time.timeScale = 0;
}
void Unpause()
{
Time.timeScale = 1;
}