- Home /
 
               Question by 
               bluelock3 · Jun 11, 2015 at 08:54 AM · 
                gameobjectmenupauseactive  
              
 
              how can i get a pause screen to work
okay so I'm making my pause screen (not in a new scene) i want the background part of the screen to freeze while pause menu is open and continue back to gameplay when resumed so i basically have this all working but i use a game object.activeinhierarchy (i know i didn't capitalize right) this is my script shortened down to what i need to show you using UnityEngine; using System.Collections;
 public class mechanics : MonoBehaviour {
 
     public GameObject openmenu;
     public bool pause = false;
     
     
     // Use this for initialization
     void Start () {
         openmenu = GameObject.Find("pause_menu");
     }       
     
     // Update is called once per frame
      void Update () {
         if (openmenu == gameObject.activeInHierarchy) {
             pause = true;
         }
         else if (pause == false){
                            nowgrow ();
             }
         }
 
     void nowgrow() {
                 transform.localScale += new Vector3 (0.1F, 0, 0);
     }
 }    
it all seems to be fine but the activeinhierarchy thing any suggestions I've looked everywhere and tried everything but i can't seem to find anything... leading me here please respond thanks
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                