title: Highscores with stored values from other Scenes
body: <p>I am trying to make a high score table with 3 variables which are from other scenes, I have a broken code where the data should be saved and reproduced:</p>
  <p>'private Transform Container;
  private Transform Template;</p>
  <pre><code>private List&lt;HighScoreEntry&gt; HighScoreEntryList;
  private List&lt;Transform&gt; highScoreEntryTransformList;
  
  // Start is called before the first frame update
  private void Awake()
  {
      Container = transform.Find(&quot;HighScoresContainer&quot;);
      Template = Container.Find(&quot;HighScoreTemplate&quot;);
  
      Template.gameObject.SetActive(false);
  
  
      //Testing
      HighScoreEntryList = new List&lt;HighScoreEntry&gt;()
      {
          new HighScoreEntry{Score=45.6f, Name=&quot;Titan&quot;,difficulty= &quot;Easy&quot;},
          new HighScoreEntry{Score=53.22f, Name=&quot;Player&quot;,difficulty= &quot;Easy&quot;}
          
      };
  
     string jsonString = PlayerPrefs.GetString(&quot;highScoreTable&quot;);
     HighScoresEntries highScoresEntries= JsonUtility.FromJson&lt;HighScoresEntries&gt;(jsonString);
     
      
      //sort th
      for(int i =0; i &lt; highScoresEntries.HighScoreEntryList.Count; i++)
      {
          for(int j=i+1; j &lt; highScoresEntries.HighScoreEntryList.Count; j++)
          {
              if(highScoresEntries.HighScoreEntryList[i].Score &gt; highScoresEntries.HighScoreEntryList[i].Score)
              {
                  HighScoreEntry temp = highScoresEntries.HighScoreEntryList[i];
                  highScoresEntries.HighScoreEntryList[i] = highScoresEntries.HighScoreEntryList[j];
                  highScoresEntries.HighScoreEntryList[j] = temp;
              }
          }
      }
      highScoreEntryTransformList = new List&lt;Transform&gt;();
  
      foreach (HighScoreEntry highScoreEntry in HighScoreEntryList)
      {
          CreateHighScoreEntryTransform(highScoreEntry, Container, highScoreEntryTransformList);
      }
  
      HighScoresEntries highScoresEntries1 = new HighScoresEntries { HighScoreEntryList = HighScoreEntryList }; 
      string json = JsonUtility.ToJson(highScoresEntries);
      PlayerPrefs.SetString(&quot;highScoreTable&quot;, json);
      PlayerPrefs.Save();
      Debug.Log(PlayerPrefs.GetString(&quot;highScoreTable&quot;));
      
      
  }
  
  private void AddhighScoreEntry(float Score, string Name, string difficulty)
  {
      HighScoreEntry highScoreEntry = new HighScoreEntry{ Score = Score, Name = Name, difficulty = difficulty };
  
      string jsonString = PlayerPrefs.GetString(&quot;hhighScoreTable&quot;);
      HighScoresEntries highScoresEntries = JsonUtility.FromJson&lt;HighScoresEntries&gt;(jsonString);
  
      highScoresEntries.HighScoreEntryList.Add(highScoreEntry);
  
      string json = JsonUtility.ToJson(highScoresEntries);
      PlayerPrefs.SetString(&quot;highScoreTable&quot;, json);
      PlayerPrefs.Save();
  }
  
  private void CreateHighScoreEntryTransform(HighScoreEntry highScoreEntry, Transform container, List&lt;Transform&gt; transformList)
  {
      float TemplateHight = 30f;
      Transform EntryTransform = Instantiate(Template, container);
      RectTransform EntryRect = EntryTransform.GetComponent&lt;RectTransform&gt;();
      EntryRect.anchoredPosition = new Vector2(0, -TemplateHight * transformList.Count);
      EntryTransform.gameObject.SetActive(true);
  
      int standings = transformList.Count + 1;
      string StandingsString;
      switch (standings)
      {
          case 1: StandingsString = &quot;1st&quot;; break;
          case 2: StandingsString = &quot;2nd&quot;; break;
          case 3: StandingsString = &quot;3rd&quot;; break;
  
          default: StandingsString = standings + &quot;th&quot;; break;
      }
  
  
      string Names;
      //Names = SettingsMenu.StoredName;
      Names = highScoreEntry.Name;
      //string Level = SpwanerPrefabs.StoreLevel;
      string Level = highScoreEntry.difficulty;
  
      //float Score = ShowScores.number;--
      float Score = highScoreEntry.Score;
      EntryTransform.Find(&quot;Standings&quot;).GetComponent&lt;Text&gt;().text = StandingsString;
      EntryTransform.Find(&quot;Name&quot;).GetComponent&lt;Text&gt;().text = Names;
      EntryTransform.Find(&quot;Difficulty&quot;).GetComponent&lt;Text&gt;().text = Level;
      EntryTransform.Find(&quot;Time&quot;).GetComponent&lt;Text&gt;().text = Score.ToString();
  
      transformList.Add(EntryTransform);
  }
  
  private class HighScoresEntries
  {
      public List&lt;HighScoreEntry&gt; HighScoreEntryList;
  }
  
  //Highscore Entry
  
  [System.Serializable]
  private class HighScoreEntry
  {
      public float Score;
      public string Name;
      public string difficulty;
  }'
  </code></pre>
  <p>here StoreLevel, and StoredName are data that have been received from other scenes, although the code is not helping in producing what it should, I really stuck with this, requesting assistance.</p>