How to Mod PlayerPrefs of Unity Games (including IL2CPP)
# Q & A
Q: What is PlayerPrefs in Unity Games?
A: PlayerPrefs is a class that stores Player preferences between game sessions. It can store string, float and integer values into the user’s platform registry.
Q: Where is PlayerPrefs stored in?
A: On Android, PlayerPrefs are stored in `/data/data/pkg-name/shared_prefs/pkg-name.v2.playerprefs.xml` or `/data/data/pkg-name/shared_prefs/pkg-name.playerprefs.xml`
Q: How to make it works in your mods?
A: what you have to do is build the source code with Android Studio to get the smali files then call that smali file in `OnCreate` of Launch Activity Smali Games. but make sure the path of PlayerPrefs games is correct.
# Example
As an example you can use this game Defense Heroes - Apps on Google Play
Example Code:
# How to call the smali file into your mods
- Copy and Place the smali files that you get from Android Studio
- Then call the file with this smali code:
Download Source Code:
# Q & A
Q: What is PlayerPrefs in Unity Games?
A: PlayerPrefs is a class that stores Player preferences between game sessions. It can store string, float and integer values into the user’s platform registry.
Q: Where is PlayerPrefs stored in?
A: On Android, PlayerPrefs are stored in `/data/data/pkg-name/shared_prefs/pkg-name.v2.playerprefs.xml` or `/data/data/pkg-name/shared_prefs/pkg-name.playerprefs.xml`
Q: How to make it works in your mods?
A: what you have to do is build the source code with Android Studio to get the smali files then call that smali file in `OnCreate` of Launch Activity Smali Games. but make sure the path of PlayerPrefs games is correct.
# Example
As an example you can use this game Defense Heroes - Apps on Google Play
Example Code:
Hidden content
- Copy and Place the smali files that you get from Android Studio
- Then call the file with this smali code:
Hidden content
Download Source Code:
Last edited: