The file may be locked open, try rebooting your system.
The issue persists after a reboot.
You might try the following to confirm that the path is what you expect:
string myString = Application.persistentDataPath.ToString() + “*.gamesave”;
Debug.Log("Path = " + myString);
Now the error shows up at the line containing
string myString = Directory.GetFiles(Application.persistentDataPath + “*.gamesave”);
Sorry, updated my code. I believe you’ll see that you left out a / character.
I apologize for my stupidity, I used “+” instead of “,” , passing the GetFiles function a wrong argument. This didn’t cause a pre-compile error as the 2nd parameter is an overload. Thanks for taking time to help.
1 Like