Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: nepomuk on November 18, 2015, 02:51:07 AM

Title: saving data on ios
Post by: nepomuk on November 18, 2015, 02:51:07 AM
i'd like to save a simple int and keed it saved even if the the player closes the app. i tried the playerprefs but it seems that the score is kept only during an active session. any suggestions?
Title: Re: saving data on ios
Post by: jeanfabre on November 18, 2015, 04:44:26 AM
Hi,

 If you are using "PlayerPrefSetInt" and "PlayerPrefGetInt" these values will persists outside active session and you can close the app the data will persits.

 If not, you are likely setting the value to an unexpected value before closing the app.

you can test this in Unity Editor, simply stop playing, and start playing again, the playerPrefs will work the same within Unity and Editor and on Mobile.

Bye,

 Jean
Bye,

 Jean