I'm attempting to save player data into a Saves
folder like so:
string relPath = "Saves/saveData.txt";
FileInfo file = new FileInfo(relPath);
file.Directory.Create();
// File.WriteAllText(relPath, JsonUtility.ToJson(data));
The issue I'm having is that file.Directory.Create();
works on my PC (Windows 11) but not on my Android device. Am I missing something, maybe in build settings or maybe permissions on the device? Is there a better (i.e. more universal) option for creating a directory?
System.IO.Directory.CreateDirectory("folder")
work? If not, my next guess would be to check permissions. \$\endgroup\$