game pause unity code example
Example 1: how to make a pause feautre in unity
if(Pause){
Time.timeScale = 0;
}
else{
Time.timeScale = 1;
}
Example 2: unity pause scene
//Pausing Scene
Time.timeScale = 0f;
//Unpausing Scene
Time.timeScale = 1f;