public const string myXMLpath = “/shop.xml”;
string sourcePath = System.IO.Path.Combine(Application.streamingAssetsPath, myXMLpath);
string destPath = System.IO.Path.Combine(Application.persistentDataPath, myXMLpath);
if (System.IO.File.Exists (sourcePath)) {
System.IO.File.Copy (sourcePath, destPath, true);
}
Im trying to copy my XML from StreamingAssets into persistentData.
For some reason the If condition is always returning false >.<
And even if i remove the IF condition, (and just copy it) it will say that my file cannot be found.
But the shop.xml is totally just there ![]()
Ive even tried combining sourcePath with Application.dataPath + “Raw/shop.xml”
Am i missing something? Any pointers will be really appreciated!!