why will unity not work with %AppData%

You can find the appdata folder with this code:

System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData)

This will return a string like "C:\Documents and Settings\Administrator\Application Data". A little example code of how you can use this:

  1. var appdata : String;
  2. appdata =System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
  3. var data = System.IO.File.ReadAllText(appdata+"/myunitygame/saves/file1.save");

猜你喜欢

转载自blog.csdn.net/chh19941125/article/details/77645535
Why