Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Is it possible to modify the data of all players?

Discussion in 'Cloud Code' started by FrostGateDeveloper, Jan 16, 2024.

  1. FrostGateDeveloper

    FrostGateDeveloper

    Joined:
    Nov 10, 2015
    Posts:
    4
    I access the Cloud Save service only from the side of the game server.
    I want to bring all player data to the correct state when updating the server. Can I use Cloud Code to go through all the players and modify their data?
     
  2. devingunity

    devingunity

    Unity Technologies

    Joined:
    May 26, 2021
    Posts:
    35
    Hi FrostGateDeveloper, we're actually just in the process now of developing an endpoint to return all players who have data in Cloud Save - once that's complete you'll be able to use that to iterate through players and update their state from Cloud Code!

    I'll update here once the functionality has been added to the Cloud Save SDK in Cloud Code.
     
    Marvin_Wack likes this.
  3. Rob_Elias

    Rob_Elias

    Joined:
    Mar 21, 2014
    Posts:
    18
    Hi devingunity the funtionality on Cloud Code to return all players who have data in Cloud Save is ready? Could you give me an example of how it is used using Cloud Script Js?
     
  4. samg-unity

    samg-unity

    Unity Technologies

    Joined:
    Mar 23, 2021
    Posts:
    47
    Just be aware that execution run times in Cloud Code are currently limited to 15 seconds which may not be enough time for you to process all players (depending on total number and the operations needed to perform on the player data) in one batch operation.