Reading old Unity PlayerPrefs from Defold

Hello Experts!

I am starting to move my game from Unity to Defold (because the app size).
As my game is already published and have more than 500 users, that already make progress (Stars and new Scenes).

I would like a way to read the existing Playerprefs, as soon as update my code to Defold.
https://docs.unity3d.com/ScriptReference/PlayerPrefs.GetString.html

Other option would be release a version in Unity only to move the way I record the PlayerPrefs, but for what format?

Regards,
Goo

3 Likes

Do you know how the Playerprefs is serialized to disk (ie in which format) and to what filename? You can read pretty much any format using the Defold io.* functions, but the typical save data format is serialized Lua tables using sys.save() and sys.load().

1 Like

Hey @gogoni.studios – welcome to Defold and the forums! Good luck with the transition :slight_smile:

2 Likes

Hello Britzl,

I found it in an Unity forum after your clue.

“On Android they are stored in your phone’s internal memory in /data/data/appname/shared_prefs/appname.xml
Where appname is the full package identifier e.g. com.mycomany.example”

“On iOS devices, the PlayerPrefs can be found in your app’s plist file. It’s located at: /Apps/ your app’s folder /Library/Preferences/ your app’s .plist
I used a free MacOS app called iExplorer to find and verify any changes I make to the PlayerPrefs on my iPad app.”

Thank you, I will keep it to go further in the future, as now I am fighting with png drag.

Regards,

4 Likes

Now it’s possible to do using this library: PPReader

3 Likes