Closed pawelsalwa closed 3 years ago
Hi pawelsalwa , PlayerPrefs is an API provided by Unity, and it's probably not a good idea to change its behavior. Although we can make some kind of wrapper to it, as this will affect the final build code and increase project dependency with ParrelSync, it's still more prefer to leave it to the developer themselves to decide.
There's a IsClone API to know whether the current editor is clone or not. You may consider do something like this if you want to have separated PlayerPrefs value for the clone.
string key = "playerPrefsKey";
#if UNITY_EDITOR
if (ClonesManager.IsClone()) { key += "_clone";}
#endif
int pValue= PlayerPrefs.GetInt(key , 0);
Describe the bug If we change PlayerPrefs value inside any editor (clone or original) all other editors have their changes reflected.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expected - PlayerPrefs value changes are only local to each editor