Hello everyone,
I have run into bit of an issue with unpausing a game on the windows simulator, no actual device and don’t know what difference that would really make, but it works in unity Editor, so my pause code and resume are something like this.
//layout start
GUI.BeginGroup(new Rect(Screen.width / 2 - 150, 50, 300, 500));
//the menu background box
GUI.Box(new Rect(0, 0, 1200, 1200), "");
//logo picture
GUI.Label(new Rect(80, 10, 300, 125), logoTexture);
GUILayout.Space(30);
GUILayout.Label("Volume");
AudioListener.volume = GUILayout.HorizontalSlider(AudioListener.volume, 0, 1);
///////pause menu buttons
//game resume button
if (GUI.Button(new Rect(55, 250, 180, 40), "Resume"))
{
//resume the game
Time.timeScale = 1.0f;
Updates.GamePaused = false;
AudioListener.pause = false;
}
//quit button
if (GUI.Button(new Rect(55, 350, 180, 40), "Quit"))
{
Application.Quit();
}
//layout end
GUI.EndGroup();
As you can see when I hit unPause the Time scale goes back one but it also works in the editor and not on the simulator, any advice?