Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Budde88 on March 09, 2016, 01:51:05 PM

Title: Delete All PlayerPrefs (SOLVED)
Post by: Budde88 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
Title: Re: Delete All PlayerPrefs
Post by: mdotstrange 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

Title: Re: Delete All PlayerPrefs
Post by: Budde88 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.
Title: Re: Delete All PlayerPrefs
Post by: djaydino 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.
Title: Re: Delete All PlayerPrefs
Post by: jeanfabre 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
Title: Re: Delete All PlayerPrefs
Post by: Budde88 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.
Title: Re: Delete All PlayerPrefs
Post by: Budde88 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 :)
Title: Re: Delete All PlayerPrefs (SOLVED)
Post by: jeanfabre 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
Title: Re: Delete All PlayerPrefs (SOLVED)
Post by: amoraleite 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.
Title: Re: Delete All PlayerPrefs (SOLVED)
Post by: djaydino 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.
Title: Re: Delete All PlayerPrefs (SOLVED)
Post by: amoraleite 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:
(https://amoraleite.files.wordpress.com/2019/04/captura-de-tela-2019-04-03-c3a0s-09.12.43.png)
Title: Re: Delete All PlayerPrefs (SOLVED)
Post by: djaydino 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!