I am following the example in the guide and I have a question. How can I receive a callback from a C# module in Cloud Code when default configuration values have been set?
Here’s what I mean:
- A trigger calls Cloud Code (a C# module).
- In Cloud Code, the method InitializeNewPlayer is called:
await gameApiClient.CloudSaveData.SetItemBatchAsync(ctx, ctx.ServiceToken, ctx.ProjectId, playerId,
new SetItemBatchBody(new List<SetItemBody>{new (HealthKey, DefaultValue), new (StaminaKey, DefaultValue)}));
- Upon completion of the method in Cloud Code, I want to update the player’s data in Unity by calling
var playerData = await CloudSaveService.Instance.Data.Player.LoadAsync
- This is to ensure that the player sees updated data in the game. Is there any callback mechanism available from the Cloud Code module other than sending a push message with await pushClient.SendPlayerMessageAsync? Are there any other options available?