title: Problems with canvas buttons in unity
body: <p>So, i have buttons for my game that include : Main Menu button , Restart button and Play button. Everything works fine, but occasionally one of the button's text doesn't load , one of them doesn't work. I'm not sure how to fix this, because it happens randomly and not every time.</p>
  
  <p>The code for the buttons : </p>
  
  <pre><code>GameObject[] pauseObjects;
  void Start()
  {
      Time.timeScale = 1;
      pauseObjects = GameObject.FindGameObjectsWithTag("ShowOnPause");
      hidePaused();
  }
  
  
  public void showPaused()
  {
      foreach (GameObject g in pauseObjects)
      {
          g.SetActive(true);
      }
  }
  
  
  public void hidePaused()
  {
      foreach (GameObject g in pauseObjects)
      {
          g.SetActive(false);
      }
  }
  
  public void LoadLevel(string level)
  {
      Application.LoadLevel(level);
  }
  
  public void pauseControl()
  {
      if (Time.timeScale == 1)
      {
          Time.timeScale = 0;
          showPaused();
      }
      else if (Time.timeScale == 0)
      {
          Time.timeScale = 1;
          hidePaused();
      }
  }
  </code></pre>