IsolatedStorageException: Could not find a part of the path

I’m trying to write save data to my Android phone’s SD Card. My manifest has and in my build options I set the write access to external(SD card).

When I try to write to a file using

Application.persistentDataPath + @"/GameName/Saves/SaveFile.xml"

I get the exception:

IsolatedStorageException: Could not find a part of the path “/mnt/sdcard/Android/data/package.name/files/GameName/Saves/SaveFile.xml”.

How am I supposed to write save data to the SD Card?

Really late but I would guess that you haven’t created the folders. You can’t save to a location where the directories don’t already exist.

use the DirectoryInfo to check if it exists and create it if it doesn’t