question

Tim Zanetti avatar image
Tim Zanetti asked

After trying to delete userdata (for testing) with DeleteAll() function, it doesnt work anymore?

Hey

I wanted to delete the user data, that I can try again if it works. So I decided to delete the user on the playfab webpage under players and once to call in my script the function PlayerPrefs.Deleteall()

But now it doesnt work anymore.

I shortly want to say what doesnt work: If I complete the Level i have 3 stars, gold silver bronze.

In the Levels Scene (there are listed up all levels) it should show the best star i got. It worked fine before i delted all.

Any Ideas what i could try to fix it?

Player Dataunity3ddataCharacter Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

PlayerPrefs.Deleteall() is a Unity API, you can find it on the Unity API Reference PlayerPrefs.DeleteAll. It’s used to remove all keys and values from the preferences. If you use the function, it deletes your local game data which may make some effects on your game.

So, if you want to delete a test Player in the PlayFab you can use the PlayFab Server/Admin API DeletePlayer. In addition, we don’t recommend using Server/Admin API on the clients. You can use server API on PlayFab CloudScript, and use admin API on your custom game management tools.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.