Search Issue Tracker
Won't Fix
Votes
1
Found in
5.6.2f1
Issue ID
926645
Regression
No
Facebook WebGL PlayerPrefs erased when the game is updated
Steps to reproduce:
1. Set up Facebook Developers account and App ID
2. Open QA attached project "PlayerPrefsWebGL.zip"
3. Open "001" scene in "Scenes" folder
4. Set App ID and Upload Access token in Player settings for Facebook platform
5. Build for Facebook platform with WebGL
6. Press "Upload last build to Facebook" or upload it manually in the Facebook API in the browser
7. Open the app on Facebook. Press G to get variable - it will show 0. Press H to set variable and G again, it will show 10. Press S to save Prefs to disk
8. Go back to Unity and build the same project again. Upload it to Facebook and set the new version for production
9. Open the app again and Press G to get variable. It will show 0 again
Expected: If the game URL is the same, the PlayerPrefs should get preserved and upon pressing G in step 9 you should see 10 appear instead of 0
Actual: The PlayerPrefs are discarded
Reproduced on: 5.6.0b1, 5.6.0f1, 5.6.2f1, 5.6.2p2, 2017.1.0b1
Everything post 2017.1.0b2 is unable to run due to corrupted archiving as per Case 926782
No Facebook support in 5.5.*
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
Resolution Note (2019.3.X):
Facebook gameroom is removed in 2019.3. If you really need to store data in user's IndexedDB then a workaround is available. But consider using a custom backend to safely do that