【发布时间】:2014-01-06 21:56:03
【问题描述】:
我想使用 StorageFile 来实现阅读和写作,如下所示
http://msdn.microsoft.com/en-us/library/windows/apps/hh758325.aspx#writing_to_a_file
有
public async void Save()
{
StorageFolder storageFolder = KnownFolders.DocumentsLibrary;
StorageFile sampleFile = await storageFolder.CreateFileAsync(PlayerPrefs.GetString("WorldName") +"_"+filename);
await Windows.Storage.FileIO.WriteTextAsync(sampleFile, "Swift as a shadow");
}
但是“await”行给出了异常
+ $exception {Cannot evaluate expression because a native frame is on top of the call stack.} System.Exception {System.UnauthorizedAccessException}
如果这有什么不同的话,我将 Unity 与 Windows 8 应用商店一起使用。
有人知道这是什么问题吗?
【问题讨论】:
标签: c# windows windows-8 microsoft-metro unity3d