The proper way of pausing the game in Unity

Time.timeScale = 0;

If you want to restore the game:

Time.timeScale = 1;