- Home /
Save data without playerprefs [android]
I know playerprefs is an easy way to save data, but I'm handling much more complex data files now.
I read this post which seems legit, but I have a few questions:
Does the method in the link above, keep data saved when the app is deleted and reïnstalled, or updated? I know playerprefs also deletes the data when the app is removed, but keeps it when it's updated.
Is there a more detailed guide on the method above, or maybe one you prefer? And does it succeed in my expectations?
Thanks for your time
Answer by pafla · Apr 20, 2014 at 02:48 PM
1) see https://docs.unity3d.com/Documentation/ScriptReference/Application-persistentDataPath.html
2) It's just ordinary .NET code, the only thing Unity related there is the usage of Application.persistentDataPath. So you should be able to find more detailed information on this anywhere on the web, in books, ...
Thanks! But I'm not sure what they mean with " removing the SD Card would make data stored on it inaccessible". Does it mean that the user $$anonymous$$UST have an SD card in order to save data?
No, you do not need an SD Card. But if you enable Write Access for the SD Card in the Player Settings, persistentDataPath uses the SD Card (if available). In that case, removing the SD Card will make the data inaccessible.