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.

Question Curious about cloud save rate and logic method

Discussion in 'Cloud Save' started by Taming, Jul 18, 2022.

  1. Taming


    Sep 4, 2021

    The picture above is a document from the official Unity website.

    1. When saving data, is it possible to save only one data type data at a time?

    2. When loading data, can I get only one value at a time?

    3. So, when fetching multiple data, each call counts as 1?
    So if I get 10 data values, do I have to make 10 calls?
  2. MileyUnity


    Unity Technologies

    Jan 3, 2020
    Hi there,

    1. Yes, you can save just 1 key and the other keys will not be affected, the type of the data doesn't matter so long as it's serializable and within the size limits
    2. Yes, you can retrieve just one key at a time if you want or however many keys you ask for in the supplied list of keys
    3. If you write them all as individual calls then yes, that would increase the call count and thus the costs. It's best to add multiple values to the data dictionary if you want to save multiple values at once, and it's also best to add multiple keys to the HashSet when loading data to retrieve all of those at once (or just use the LoadAllAsync method to load everything in one go)

    The API returns values in a paginated manner with a page size of 20, this means that if you're requesting 10 items it will take just 1 API call but if you'd request 21 items for instance it would take 2 API calls. This behavior is handled by the SDK for you so you don't have to think about that :)

    Hope this helps