title: Access public bool from another script in Unity
body: <p>I'm looking to trigger a public bool setup in a LevelManager Script from another script.</p>
  
  <p>so when something happens on script B, the bool in script A switches to true.</p>
  
  <p>Below, are 2 scripts where levelRestart.cs is a trigger, when a player hits, it needs to access the public bool in the LevelManager script and say <code>startGame</code> is true.</p>
  
  <p>Can someone help?</p>
  
  <p>LevelManager.cs</p>
  
  <pre><code>public bool startGame = false;
  
  void Update ()
      {
  
          if (startGame == true)
          {
              SpawnKonyaku();
              startGame = false;
          }
      }
  </code></pre>
  
  <p>LevelRestart.cs</p>
  
  <pre><code>void OnTriggerEnter2D(Collider2D col)
      {
          if (col.gameObject.tag == "Player")
          {            
              levelManager.startGame = false; //&lt;- This is where, i need help    
          }
      }
  </code></pre>
  
  <p>RestartLevel Script to trigger public bool startGame to be true</p>