Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

PlayerPrefs save format?

Discussion in 'Documentation' started by ruuhkamies, Mar 2, 2015.

  1. ruuhkamies

    ruuhkamies

    Joined:
    Mar 2, 2015
    Posts:
    1
    Hello!

    I am saving my gamestate using PlayerPrefs and its working well, however, I'd like to be able to edit these gamestate savefiles but they seem to be obfuscated(?)

    They're base64 encoded and even after decoding the gamestate json isnt fully restored

    Is there any documentation or info available how PlayerPrefs is saving the data?

    I know its in base64 json format, but thatsnot all
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    They're not, which is why assets exist specifically to obfuscate them. If you're talking about PlayerPrefs.SetString, it does exactly that (sets a string, using UTF-16).

    --Eric