Search Unity

PlayerPref overwrote problem

Discussion in 'Web' started by stylophone, Jan 27, 2016.

  1. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Hi. Let's say I have two games that are hosted on a same server/domain but with different path and url, both of them are sharing with the same key for store player's best score. Let's say the key name is "BestScore". And When I do PlayerPrefs.SetInt("BestScore", 10); in Game A. The result will also affects the Game B. And both of the games "BestScore" will be changed to 10...

    I can't find the document that explains how the PlayerPref works on WebGL but I guess it's because of the same domain and the same key name?
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Thanks for reporting the issue. We identified the problem and we are implementing a fix.