I have doubt regarding certain concepts between these two. For Application.streamingAssetsPath
, I should create a StreamingAssets folder in my project, so that I can save files to it and later reload it. So what is the role of Application.persistentDataPath
and the role of Application.streamingAssetsPath
?
If I have assets and data (Position, health etc) to be saved and later reload them in mobile devices (Android and IOS) and PC. Which is the best option?
Below I save using Application.streamingAssetsPath
using (FileStream fs = new FileStream(Application.streamingAssetsPath + "/Position.json", FileMode.Create))
{
BinaryWriter filewriter = new BinaryWriter(fs);
filewriter.Write(JsonString);
fs.Close();
}