title: Using [Serializable] with mscorlib (Unity)
body: <p>I'm building an iOS game using Unity and in the docs for optimisation, it says:</p>
  
  <pre><code>Don’t use anything that lives in System.dll or System.Xml.dll in your code. These libraries are not compatible with micro mscorlib.
  </code></pre>
  
  <p>Here's the <a href="http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html" rel="nofollow">link to that page</a>.</p>
  
  <p>In my code, to save game data I have a class like so:</p>
  
  <pre><code>[Serializable]
  class GeneralGameData {
      public bool muteMusic;
      public bool muteSoundFX;
      public bool muteVibration;
      public int highestScoreAchieved;
  }
  </code></pre>
  
  <p>Which requires:</p>
  
  <pre><code>Using System;
  </code></pre>
  
  <p>When I run the game, it seems ok with mscorlib to use this but get a nasty crash, a crash that kills unity every now and again and also the game at random points. I suspect it might be to do with this.</p>
  
  <p>Can anyone point me in the right direction to how to save serialized data with micro mscorlib?</p>
  
  <p>Cheers.</p>