So I’m using the com.unity.services.cloud-save.key-saved.v1 trigger via cloud code module.
Basically, when playerDataA is changed, the trigger calls a function that then updates playerDataB with some of playerDataA’s properties. It then saves the updated data.
The update works (playerDataB is changed), and I get a successful response from trigger action, but then I get an error response from trigger action.
I’m guessing it has something to do with the update of playerDataB also causing the trigger, but I’m not sure what I can do about it. Is it a bug or a feature? Below is the trigger method. The only thing the HandlePlayerDataUpdate() method does is update and save the data. If the trigger is called a second time, that method will not be called because they have different key Ids.
I’m guessing it has something to do with the update of playerDataB also causing the trigger, but I’m not sure what I can do about it.
Are you already using a filter on the trigger you created? Filters. If not this could prevent the re-trigger of the script on the playerDataB update as you could move your logic on checking the key to the trigger.
data['key'] == 'playerDataA'
Please note that unfortunately you can only apply the filter on creation directly via the REST API at this time.
I get a successful response from trigger action, but then I get an error response from trigger action.
If you could provide any further information on the error response you received, that could help clarify the issue if you’re already using filters.
I am not using a filter, I’ll give that a shot, thanks.
As to the error detail, it did not seem to be very informative, other than a severity number (I changed the code with a workaround, so I’m not getting the error any longer).
Unfortunately for the moment thats correct, it will be fully supported by the CLI tool in a future release but the docs have an example using curl here: HTTP APIs