Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  6. Unity 2017.2 beta is now available for download.
    Dismiss Notice

PlayerPref overwrote problem

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

  1. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    27
    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,177
    Thanks for reporting the issue. We identified the problem and we are implementing a fix.