Search Unity

Question Saving custom Binary Files in Google Play Services (Cloud Save)

Discussion in 'Cloud Save' started by arnoldhide, Nov 5, 2021.

  1. arnoldhide

    arnoldhide

    Joined:
    Jun 2, 2014
    Posts:
    9
    Hi.

    In my games, i'm using custom binary files to save my progress, and so far, everything is going well.
    I'm following the tutorial from Brackeys

    SAVE & LOAD SYSTEM in Unity - YouTube

    This will allow me to create custom files for save and load. This custom file will be saved locally.

    But i wanted to add cloud save feature on my games as well. I didn't have Developer accounts (yet) so i can't test it. I wanted to know :
    1. Can i save the custom file on Play Services
    2. If i can, is it possible to play the game without internet connection, and back up the save file once the internet connection is back.
    3. Also if it is possible, is there any tutorial i can follow?

    Thank you.
     
  2. Laurie-Unity

    Laurie-Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    220
    Hi,

    Thanks for sharing your question and the link to Brakeys excellent tutortial on saving binary player data files.

    1. Can i save the custom file on Play Services

    Not yet, Cloud Save is still in Beta and currently only supports saving a dictionary of key value pairs, much like the player prefs example in the Brackeys tutorial, to the cloud. However, the ability to save binary files too would be a really useful feature and we are working hard to build out more functionality, so watch this space.

    It is also worth clarifying that Cloud Save doesn't save to, or rely on Play Services, it saves to our own cloud storage solution.

    2. If i can, is it possible to play the game without internet connection, and back up the save file once the internet connection is back.

    If there is a problem with network connection, because the player is offline or for some other reason, the Cloud Save SDK will return a CloudSaveException along with the reason why. You can then decide in your own code how you handle that. It is up to you whether or not you allow the player to continue playing offline, then update their saved data when they next come online.

    3. Also if it is possible, is there any tutorial i can follow?

    The Cloud Save documentation contains a code example and there is a sample project included that can be installed from the package manager.
     
    DhiaSendi, OberZine and arnoldhide like this.
  3. arnoldhide

    arnoldhide

    Joined:
    Jun 2, 2014
    Posts:
    9
    Thank you so much for the great reply. I'll take a look at the docs for my next project.
     
    Laurie-Unity likes this.
  4. vallis_unity

    vallis_unity

    Joined:
    Apr 14, 2022
    Posts:
    73
    Hi Laurie, wondered if there is any update on this? Is it still on the roadmap? Is there any kind of ETA at all? Is there anywhere the feature request can be upvoted? Apologies for the thread resurrection but this is the top result for me from the search engine. Many thanks.
     
    ihgyug likes this.
  5. AshleyM_Unity

    AshleyM_Unity

    Unity Technologies

    Joined:
    Feb 23, 2023
    Posts:
    4
    Hi @vallis_unity, files capability for Cloud Save is actually coming very soon! We are aiming to release a new version of the SDK in the next month or so that includes this plus other additional features and improvements. I've sent you a DM to further discuss potential interest in early access testing.
     
    vallis_unity and SebT_Unity like this.
  6. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    489