Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

PlayerPrefs on Windows 8.1

Discussion in 'Windows' started by Brumby, Sep 8, 2014.

  1. Brumby

    Brumby

    Joined:
    Sep 8, 2014
    Posts:
    16
    Has anybody else had an issue with PlayerPrefs on Windows 8.1 ? I’m using PlayerPrefs for saving HighScores. During the game PlayerPrefs seems to work, but if I restart the app all saved stats are gone. Why?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Maybe you don't call PlayerPrefs.Save?
     
  3. Brumby

    Brumby

    Joined:
    Sep 8, 2014
    Posts:
    16
    Yeah, you're right. It works perfectly now.
    It's weird because it seems to work on other platforms without calling PlayerPrefs.Save().
    I really appreciate your help!
     
  4. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    It's a known issue. Don't use the Build and Run command from the Unity editor.
    Use Build.

    Then run the game from your Visual Studio solution.