title: How to pause parts of a game in Unity
body: <p>I have a pause menu that I built in Unity3D, using sprites and colliders. I can't pause the game using something like this: </p>
  
  <pre><code>if(gameObject == pauseButton)
  {
      Time.timeScale = 0;
  }
  </code></pre>
  
  <p>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?</p>
  
  <p>Also, is it generally a terrible idea not to use Unity GUI objects when building a gui?</p>