title: How to pass data (and references) between scenes in Unity
body: <p>How can I pass score value from one scene to another?</p>
  
  <p>I've tried the following:</p>
  
  <p><strong>Scene one:</strong></p>
  
  <pre><code>void Start () {
      score = 0;
      updateScoreView ();
      StartCoroutine (DelayLoadlevel(20));
  }
  
  public void updateScoreView(){
      score_text.text = "The Score: "+ score;
  }
  
  public void AddNewScore(int NewscoreValue){
      score = score + NewscoreValue;
      updateScoreView ();
  }
  
  IEnumerator DelayLoadlevel(float seconds){        
      yield return new WaitForSeconds(10);
      secondsLeft = seconds;
      loadingStart = true;
      do {        
          yield return new WaitForSeconds(1);
      } while(--secondsLeft &gt;0);
  
      // here I should store my last score before move to level two
      PlayerPrefs.SetInt ("player_score", score);
      Application.LoadLevel (2);
  }
  </code></pre>
  
  <p><strong>Scene two:</strong></p>
  
  <pre><code>public Text score_text;
  private int old_score;
  
  // Use this for initialization
  void Start () {    
      old_score = PlayerPrefs.GetInt ("player_score");
      score_text.text = "new score" + old_score.ToString ();      
  }
  </code></pre>
  
  <p>but nothing displayed on screen, and there's no error.</p>
  
  <p>Is this the correct way to pass data ?</p>
  
  <p>I am using Unity 5 free edition, develop game for Gear VR (meaning the game will run in android devices).</p>
  
  <p>Any suggestion? </p>