title: Unity throws nullreference Exception at accessing a static variable
body: <p>I want to use static variables to provide Gui-text's to other scripts. In the script where I declare those variables as static everything works fine- in all other scripts I get a <code>NullReferenceException</code> .</p>
  
  <p>Here the code of the Outputscript:</p>
  
  <pre><code>public class OutputScript : MonoBehaviour {
     public static UnityEngine.UI.Text CommandText;
     public UnityEngine.UI.Text ct1;
     void Start()
     {
             CommandText = ct1;
             Debug.Log("static output's set");
     }
  }
  </code></pre>
  
  <p>Here is a method of another script which accesses it:</p>
  
  <pre><code>void OnTriggerExit()
  {
      OutputScript.CommandText.text = "";//nullRefException
  }
  </code></pre>
  
  <p>If I try this in the OutputScript, there's no exception</p>
  
  <pre><code>void Start()
  {
    CommandText = ct1;
    OutputScript.CommandText.text = "";//works fine
    Debug.Log("static output's set");
  }
  </code></pre>
  
  <p>If I check in the other scripts for <code>null</code> it returns <code>true</code> .</p>
  
  <p>I know what a NullReferenceException is, but in this case I've set the public static variable, but its value is only not null in this script which isn't logical for me.
  I really have no idea what's going on there.</p>
  
  <p>For people who don't know Unity3d Scipt enigne:</p>
  
  <ul>
  <li>the Start() method gets called always first</li>
  <li>the OnTriggerExit() method gets executed after Start()</li>
  </ul>