title: Some trouble with unity scripting
body: <p>Have next trouble in Unity C#
  Setting variable to script from another and check its changing in Update method
  Its changing once and returning to previous value 
  i initialize this variable before any method
  some example of code which i try</p>
  
  <pre><code>public class someclass: MonoBehaviour
  {
      public int myvariable=1; 
      void Update()
      {
          print(myvariable);
      }
  } 
  </code></pre>
  
  <p>When i change it from another script i get that value only once
  I can't understand where can be my problem </p>
  
  <p>changing by next</p>
  
  <pre><code>public class someanotherclass: MonoBehaviour
  {
      void someEvent()
      {
          someclass changing=GetComponent&lt;someclass&gt;();
          changing.myvariable=2;
      }
  }
  </code></pre>