0

I have a pause menu that I built in Unity3D, using sprites and colliders. I can't pause the game using something like this:

if(gameObject == pauseButton)
{
    Time.timeScale = 0;
}

because it pauses my pause menu too. I realize I should have built the pause menu with GUI objects so the game can be paused without pausing the GUI menu but I'm wondering if there is an easy workaround. Is it possible to assign pause menu elements to a layer and then enable the layer while the other layers are paused?

Also, is it generally a terrible idea not to use Unity GUI objects when building a gui?

LooMeenin
  • 818
  • 3
  • 17
  • 33
  • 1
    you can do SetActive(false) on the gameObject that contains all the child objects that should be paused – CodeSmile Jul 15 '14 at 21:09
  • 1
    *" is it generally a terrible idea not to use Unity GUI objects when building a gui?"* ... it is generally a terrible idea to use Unity's own GUI system :) At least until the new system comes out in 4.6. – Bart Jul 15 '14 at 21:35

1 Answers1

-1

You can pause your game with UGUI, you can setActive(true) with Resume btn when you pause the game, you can follow the steps by http://www.huwgames.com/pause-resume-your-game-in-unity3d/

Community
  • 1
  • 1
  • We try to avoid linking to instructions because the link could break. Could you edit your answer to include a summary of the relevant instructions from the linked article? – Oblivious Sage Mar 13 '15 at 15:04