Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feature Request Upload (.txt) save files to the cloud per player

Discussion in 'Cloud Save' started by Deleted User, Jul 9, 2022.

?

How Important Is Uploading Save Files To The Cloud To You?

  1. CRITICAL

    50.0%
  2. IMPORTANT

    30.0%
  3. NICE-TO-HAVE

    20.0%
  1. Deleted User

    Deleted User

    Guest

    Hi!

    I use Easy Save to save players' progress. The save file output is a .txt file, which is saved locally on the user's machine.

    This saving system can save pretty much everything & every type, literally, including GameObjects. And it's pretty straightforward to use, save & load, with only one line of code (unlike the complicated Cloud Save's API, which is also pretty limited on what it saves).


    - Now, to the question:
    1. Can I already upload such save files from the user's machine -locally- to the Cloud per player? If not, when can we expect it to land? Are there any Plans/Roadmap for it?


    Thanks!
     
    LilGames likes this.
  2. Unity_AndyP

    Unity_AndyP

    Unity Technologies

    Joined:
    Jun 23, 2021
    Posts:
    45
    Unfortunately, you are not able to save game objects using Cloud Save.

    Generally, you would use Cloud Save to store player progression such as their currency values, scores, levels etc. you can even store coordinate values for whatever you need.
    This will allow you to have the players' progress stored for use across multiple devices using Authentication Login.

    To get this information from the user's local device you have the user play the game as normal and once the values are loaded in you could assign their properties to Cloud Save keys and send them straight up to our servers. Doing it this way will ensure data consistency and allow your users to retain their progress even if they uninstall and reinstall at a later date.
     
  3. Deleted User

    Deleted User

    Guest

    But, how should I go about saving GameObjects, like skins? Let's say my game has those features:
    1. Skins (GameObjects)
    2. Collectables; once taken, they're disabled/deactivated and saved at that state (GameObjects)
    3. And the like!

    int, float or string do NOT accept GameObejct format, unless you hack it somehow or write your Own extension for it. And Plus, it wouldn't look code-wise and would be a mess with lots of codes to send & receive for such Simple tasks; it isn't Straightforward.

    - Is there any simpler and more convenient way to save the mentioned? I'm more of an Artist than a Programmer, so sending/uploading .es3 (.txt) Easy Save files are Way more convenient for me, and I'm sure a Lot of us, too!


    > I Recommend making samples under Cloud Save in the Package Manager that are:
    • Simple & Easy
    • With UI & Straightforward Examples
    • Understandable Naming Conventions
    • Best Practices
    • Also, K.I.S.S.

    - Is something like this in the works? I don't think it requires you more than a week to implement, and it would save me & the community a LOT of Troubles.
     
  4. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    424
    Saving actual gameobjects?? Like the textures, model data, etc? That seems incredibly wasteful (as far as data size and transfers). You should be saving indexes and other simple pointers to the local assets.

    That said, @Unity_AndyP , for our projects our save data is compressed and obfuscated. We'd like the ability to upload this single file and download it. (eg: base64). We have a custom solution built in Azure but it would be nice to have a simpler "service" solution with a simple dashboard as part of Unity's gaming services.

    To underscore the benefit of what we're doing, our save data starts off as JSON and takes up about 30kb. We compress/obfuscate it and end up with a 14kb file. Uploading it to a server has the benefit that it can have backups ("versions") and also be accessed by any device using the same player ID (It's cross-platform! Something Unity advertises as a strength).
     
  5. codoraunity

    codoraunity

    Joined:
    Sep 22, 2022
    Posts:
    4
    Hello @LilGames Thanks for this. Actually i am looking for this code. How we can save the json file on the Cloud save. As currently it only saving the key value format, but actually i want to save a complete json file on the cloud in UGS. As this possible? If yes, How?
     
  6. Laurie-Unity

    Laurie-Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    174
    Hi @codoraunity

    You can indeed use Cloud Save to store JSON data, but you will need to store it as a string in Cloud Save and Deserialize it back into a JSON object when you load it.

    You should also note that there is a limit 200 different data slots per player and limit of 16KB per slot.

    You will find more information and links to sample projects in the Cloud Save documentation, the Cloud Save package also comes with a sample that you can install and refer to.