playMaker

Author Topic: saving data on ios  (Read 698 times)

nepomuk

  • Playmaker Newbie
  • *
  • Posts: 32
    • View Profile
saving data on ios
« on: November 18, 2015, 12: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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: saving data on ios
« Reply #1 on: November 18, 2015, 02: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