playMaker

Author Topic: Delete All PlayerPrefs (SOLVED)  (Read 8234 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
Delete All PlayerPrefs (SOLVED)
« on: March 09, 2016, 01:51:05 PM »
I've been working with Playmaker and Player Prefs for over 2 years now, and I have never run into this issue.

I have 1 Player Pref that just won't have it's Data Erased, everything else erases just fine. Its an INT Pref, does anyone have an idea of what may be the cause? I tried to delete it specifically by it's Key name, just won't delete the data.

Thanks in advance
« Last Edit: March 10, 2016, 12:24:02 PM by Budde88 »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Delete All PlayerPrefs
« Reply #1 on: March 09, 2016, 02:25:04 PM »
Never had that issue but when working with player prefs this asset will make it easier to debug as you can see the Player pref changes in the editor during runtime https://www.assetstore.unity3d.com/en/#!/content/7070

Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Delete All PlayerPrefs
« Reply #2 on: March 10, 2016, 08:35:22 AM »
Thanks, but the last thing I need is another plugin.
I would really love a reply from the Devs about this, it is such an odd occurence. I just want to know what could possibly cause an issue like this.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Delete All PlayerPrefs
« Reply #3 on: March 10, 2016, 08:50:33 AM »
Hi,
I never had this issue neither, but i think this is a unity issue.
You should try to search their forum and/or post the issue there also.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Delete All PlayerPrefs
« Reply #4 on: March 10, 2016, 09:43:02 AM »
Hi,

It's typical actually: I think it's most likely a logical issue. Everytime I had such problem, it turned out I was saving prefs straight away after having deleted it, or similar glitch in logic when reading, accessing clearing, initializing prefs.

When I have this problem, I edit the playerpref action to put some debug log, you'll see clearly what prefs get accessed, how and when.


Bye,

 Jean

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Delete All PlayerPrefs
« Reply #5 on: March 10, 2016, 09:53:23 AM »
Thanks Jean,

I guess I will look into it like that, it's most probably what's happening.
I mean it's only happening on that 1 Player pref, so hopefully I will track it down.

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Delete All PlayerPrefs
« Reply #6 on: March 10, 2016, 09:57:40 AM »
FOUND IT!

Not more than 2 minutes after your reply Jean.
It was exactly as you mentioned above, learned something new today :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Delete All PlayerPrefs (SOLVED)
« Reply #7 on: March 25, 2016, 02:41:04 AM »
Yep :)

That's way asking to others is always good, hence the "there is no stupid question" moto :) it forces the brain to actually formulate the problem to others which then makes it easier to solve, else you stay within a locked frame of thinking that is too narrow.

Bye,

 Jean

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Delete All PlayerPrefs (SOLVED)
« Reply #8 on: April 02, 2019, 02:35:38 PM »
A little quest about delete playerprefs.

the action works, but I have to stop and restart the project on Unity.
There is a way to delete and update without out of the game? Some type of refresh.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Delete All PlayerPrefs (SOLVED)
« Reply #9 on: April 02, 2019, 06:23:11 PM »
Hi.
The changed data on your variables will not change by deleting playerprefs.

You could use  'set fsm' action and set the default data on variables.

amoraleite

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Delete All PlayerPrefs (SOLVED)
« Reply #10 on: April 03, 2019, 08:17:31 AM »
Thank you DJ! -> The changed data on your variables will not change by deleting playerprefs.


What I do:

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Delete All PlayerPrefs (SOLVED)
« Reply #11 on: April 03, 2019, 05:07:02 PM »
Hi.
Ah yes that will work also as all variables will be reset to their default state :)

Thanks for sharing your solution!