Search Unity

PlayerPrefs & Steam Cloud

Discussion in 'Editor & General Support' started by atmosgames, Sep 30, 2016.

  1. atmosgames

    atmosgames

    Joined:
    Dec 14, 2011
    Posts:
    71
    Hey all,

    I'm finishing up my project Pinstripe, and I'd like to utilize Steam's cloud save feature if possible. Pinstripe is a single player adventure, so using PlayerPrefs was a more than reasonable option to save the game. However, I'm realizing now that PlayerPrefs is a pretty dynamic system, varying it's save location from device to device. I'm curious if anyone has figured out how to implement PlayerPrefs & Steam Cloud.

    I've referenced the following, but understand that it's using persistantDataPath and not PlayerPrefs: https://partner.steamgames.com/documentation/cloud

    Any thought?

    Thomas
     
  2. Sprawl

    Sprawl

    Joined:
    Jan 19, 2014
    Posts:
    42
    I'm curious, have you found a solution to this or did you end up not using PlayerPrefs ?
     
  3. buggy_glitch

    buggy_glitch

    Joined:
    Jan 23, 2016
    Posts:
    4
    Any update to this ,I'm stuck here as well.
     
  4. turnipinrut

    turnipinrut

    Joined:
    Oct 27, 2014
    Posts:
    13
    Hi guys

    I made a free PlayerPrefs replacement library that does everything playerprefs does AND saves the data to a file that can be easily synced with steam cloud save.

    check it out here: https://github.com/richardelms/FileBasedPlayerPrefs

    It has all the same methods as PlayerPrefs so you can just do find replace in your project to switch over.
     
  5. matt33315

    matt33315

    Joined:
    Mar 28, 2014
    Posts:
    94
    Thanks so much for this!, super simple to implement and works a treat.
     
  6. YuVoNova

    YuVoNova

    Joined:
    Nov 2, 2016
    Posts:
    1
    Currently using 2019.1.8f1 and still works like a charm! Thank you so much.
     
    Vaupell likes this.
  7. Dknighter2

    Dknighter2

    Joined:
    Aug 17, 2014
    Posts:
    44
    Just tried the file based one and players are able to change the values in cheat engine. Just posting this here if anyone comes searching in the future.
     
    LilGames likes this.
  8. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Players can change the values in the normal registry-based PlayerPrefs as well. Attempting to stop players from reading/changing data on their own computers is a futile effort.
     
    Saulotti and Joe-Censored like this.
  9. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Yep, the best you can do is raise the skill level required to make the changes, or raise the time investment needed (encryption/obfuscation/etc). You can't actually stop it from happening.
     
    Saulotti likes this.
  10. Anonymou5Coding

    Anonymou5Coding

    Joined:
    Jan 15, 2021
    Posts:
    28
    Still works very well!
     
    Rejutka likes this.
  11. TaylorCaudle

    TaylorCaudle

    Joined:
    Feb 8, 2018
    Posts:
    158
    Works great, thanks!