That didn’t work either. I have the using System.IO; in the first line of the
script and checking File exists with:
System.IO.File.Exists
in the same script works, but not deleting line.
Try changing your path to include “/private” at the beginning, like so:
string filePath4Realz = “/private” + oldFilePath
Also make sure you don’t prepend with “file://”.
I’m not sure why this works; it looks like iOS needs this at the beginning if you want to make changes to your files. Hopefully someone else can chime in to say if this is a horrible idea, but it works for me.
Edit: you will of course want to conditionally add this to your path if you’re on iOS. You don’t want to do this with the unity player. Something like “#if UNITY_IPHONE” should work fine.