title: Calling a non static variable from another Script in Unity C#
body: <p>I'm trying to call overlapping in my first script, it works perfectly and gives the desired result when I use a debug.log within it's own script but it always returns false when I try to call it.</p>
  
  <p>First Script:</p>
  
  <pre><code>public class AscendingSquareScript : MonoBehaviour {
      public GameObject ascendingBlock;
      SquareBlockScript squareBlockScript;
      float playerWidth;
      float playerHeight;
      float xPlacement;
      GameObject ascendingSquareHolder;
      public KeyCode moveDown;
      GameObject block;
      public SquareBlockScript value;
      void Start() {
          squareBlockScript = ascendingBlock.GetComponent&lt;SquareBlockScript&gt; () as SquareBlockScript;
          ascendingSquareHolder = GameObject.FindGameObjectWithTag ("AscendingSquareHolder");
  
          playerHeight = ascendingBlock.gameObject.renderer.bounds.size.y;
          playerWidth = ascendingBlock.gameObject.renderer.bounds.size.x;
  
          for (int i = 0; i &lt; 6; i++) {
              RandomNumberGenerator ();
              block = Instantiate (ascendingBlock) as GameObject;
              block.transform.position = new Vector3(Camera.main.ScreenToWorldPoint(new Vector3(0f,0f,0f)).x + (playerWidth/2) + (playerWidth * xPlacement),  Camera.main.ScreenToWorldPoint(new Vector3(0f,0f,0f)).y + playerHeight/2 + (playerHeight*i),0f);
              block.transform.parent = ascendingSquareHolder.transform;
          }
      }
  
      void Update () {
          if (ascendingBlock.GetComponent&lt;SquareBlockScript&gt; ().getOverLap ())
              Debug.Log ("It is currently working");
  
          if (Input.GetKeyUp (moveDown)) {
              ascendingSquareHolder.transform.position = ascendingSquareHolder.transform.position + new Vector3(0f, -playerHeight, 0f);
              GeneratingSquares();
          }
      }
  }
  </code></pre>
  
  <p>Second Script:</p>
  
  <pre><code>public class SquareBlockScript : MonoBehaviour {
      public bool overLapping = false;
  
      // Use this for initialization
      void Start () {
      }
  
      // Update is called once per frame
      void Update () {
  
      }
      void OnTriggerEnter2D(Collider2D col){
          if (col.gameObject.tag == "Player") {
              overLapping = true;
              Debug.Log (overLapping + " it is");
  
          }
          if (col.gameObject.tag == "LowerBound") {
              Destroy (this.gameObject);
          }
      }
      void OnTriggerExit2D(Collider2D col){
          if (col.gameObject.tag == "Player") {
              overLapping = false;
          }
      }
      public bool getOverLap(){
          return overLapping;
      }
  }
  </code></pre>