title: Unity 3d Persistent data, Save file doesn't come out as hoped
body: <p>I have recently started with Unity. Currently I'm stuck when it comes to data persistence. While I can create a file, however it doesn't contain the serialized variable. I've already read and seen various tutorials. Unfortunately, I still do not get ahead. I would be very grateful if someone could help me.</p>
  
  <p>This is my <strong>SaveLoad.cs</strong> I could use without editing much:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using System.Collections.Generic;
  using System.Runtime.Serialization.Formatters.Binary;
  using System.IO;
  
  public static class SaveLoad {
      public static List&lt;Game&gt; savedGames = new List&lt;Game&gt;();
  
      public static void Save() {
          savedGames.Add(Game.current);
          BinaryFormatter bf = new BinaryFormatter();
          FileStream file = File.Create (Application.persistentDataPath + "/savedGames.gd");
          bf.Serialize(file, SaveLoad.savedGames);
          file.Close();
      }
      public static void Load() {
          if(File.Exists(Application.persistentDataPath + "/savedGames.gd")) {
              BinaryFormatter bf = new BinaryFormatter();
              FileStream file = File.Open(Application.persistentDataPath + "/savedGames.gd", FileMode.Open);
              SaveLoad.savedGames = (List&lt;Game&gt;)bf.Deserialize(file);
              file.Close();
          }
      }
  }
  </code></pre>
  
  <p>Here is my <strong>game.cs</strong> with the (I hope) serialized variable I try to save:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  [System.Serializable]
  public class Game { 
  
      public static Game current;
      public Click CurrentEuros { get; set; }
  
      public Game () {
          //CurrentEuros = 1;
          CurrentEuros = new Click();
      }
  }
  </code></pre>
  
  <p>The outcome is alway in the last line of the savedGames.gd "Game".</p>