title: Saving the progress of a Unity game in isolated storage
body: <p>I am building a Unity game targetted for Windows Store 8.1 and I need to save game progress in isolated storage. But using 'await' operator in accessing the local storage gives me this error </p>
  
  <pre><code>'await' requires that the type 'Windows.Foundation.IAsyncOperation&lt;Windows.Storage.StorageFile&gt;' have a suitable GetAwaiter method. Are you missing a using directive for 'System'?
  </code></pre>
  
  <p>Is there a way i can use 'await' operator somehow? </p>
  
  <p>I figured if I implement my Save method in the solution generated after exporting the project to Windows 8.1 it would work fine. Trouble is I am not sure how to access the variables and methods(required in saving the game) of the unity script in the main solution.</p>
  
  <p>Can anyone help with any of these approaches or if there is a better one?</p>
  
  <p>EDIT:
  Here is the code I am using:</p>
  
  <pre><code>public async void save_game()
  {
      StorageFile destiFile = await ApplicationData.Current.TemporaryFolder.CreateFileAsync("Merged.png", CreationCollisionOption.ReplaceExisting);
      using (IRandomAccessStream stream = await destiFile.OpenAsync(FileAccessMode.ReadWrite))
      {
          //you can manipulate this stream object here
      }
  }
  </code></pre>