- Home /
Windows 8 - Windows.Storage WriteTextAsync exception
I want to use StorageFile, to implement Reading&Writing as seen here
http://msdn.microsoft.com/en-us/libr...ting_to_a_file
With
public async void Save()
{
StorageFolder storageFolder = KnownFolders.DocumentsLibrary;
StorageFile sampleFile = await storageFolder.CreateFileAsync(PlayerPrefs.GetString("WorldName") +"_"+filename_blocks);
await Windows.Storage.FileIO.WriteTextAsync(sampleFile, "Swift as a shadow");
}
But the "await" line gives the runtime exception
Cannot evaluate expression because a native frame is on top of the call stack.} System.Exception {System.UnauthorizedAccessException}
Anyone know what the problem is here?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613125722im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Script can't save data into file 1 Answer
loading a downloaded file at runtime 1 Answer
How Do I Write to a Created File? 1 Answer
Read and write to huge files 1 Answer
Saving Level data to a file 1 Answer