title: Modifying a variable from another class c#
body: <p>I have to call the variable "rotSpeed" in my case. To the class difficulty, and change it accordingly. how do i call it?</p>
  
  <p>The variable is in another class.</p>
  
  <pre><code>public float rotSpeed = 90f;
  </code></pre>
  
  <p>This is the variable</p>
  
  <p>I need to call it to this code:</p>
  
  <pre><code>public class Difficulty : MonoBehaviour {
  
  public float multiplyerx1 = .25f;
  public float multiplyery1 = .4f;
  public float multiplyerx2 = .25f;
  public float multiplyery2 = .4f;
  public Texture BackgroundTexture;
  
  
  void OnGUI(){
  
      GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), BackgroundTexture);
      //Hard
      if (GUI.Button( new Rect(Screen.width * multiplyerx1, Screen.height * multiplyery1, Screen.width * .5f, Screen.height * .1f), "Hard")){
          //Put in change of rotspeed
          Application.LoadLevel("GameScene");
      }
      //Easy
      if (GUI.Button( new Rect(Screen.width * multiplyerx2, Screen.height * multiplyery2, Screen.width * .5f, Screen.height * .1f), "Easy")){
          //Put in change of rotspeed
          Application.LoadLevel("GameScene");
      }
  
  }
  </code></pre>