title: Saving/loading data in Unity
body: <p>I have been messing around with saving and loading in Unity in which I save a serialized class to a file.  I have a Serializable class :</p>
  
  <pre><code>[Serializable]
  class Save
  {
      public List&lt;int&gt; ID = new List&lt;int&gt;();
      public List&lt;int&gt; Amounts = new List&lt;int&gt;();
  }
  </code></pre>
  
  <p>and save it to a file A-OK.  I can load it with no errors but if I wanted to add later :</p>
  
  <pre><code>[Serializable]
  class Save
  {
      public List&lt;int&gt; ID = new List&lt;int&gt;();
      public List&lt;int&gt; Amounts = new List&lt;int&gt;();
      public int extra = 0;
  }
  </code></pre>
  
  <p>and I run my scripts it gives me a deserialization error which I completely understand as when I cast the deserialized file to my new class 'Saved' the new variable I added doesn't exist and it gives me the error.  </p>
  
  <p>I found this error when I was fixing an Asset in the store and I know one fix can be just change the filename so a new file is created but I don't just want to wipe the contents of what was saved before.  </p>
  
  <p>So my question is, if I wanted to add more variables to my serialized class how would I catch and adjust to old versions of it if people were to update the asset?</p>
  
  <p>Thanks!</p>