question

koreagantz avatar image
koreagantz asked

Data of CloudScript Send to frontend

For example, you need to level up your character.
I want to write in CloudScript. I want to read a predefined character table from the database, compute this table data and send it to the client (frontend).
 

Is there any way to do this?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

You can call the Client API ExecuteCloudScript on clients to execute a specific CloudScript functions that host on the handler, the result returned by the function will be contained in the response of this API. Then you can parse the API response and extract the data you need on the cliens. For more information about how to use the CloudScript, you can check the documentation -- Writing custom CloudScript - PlayFab | Microsoft Docs. Besides, please note don’t exceed the limits of the CloudScript usage when using the CloudScript, you can navigate to [Game Manager]->[Title settings]->[Limits] (https://developer.playfab.com/en-US/c/[YourTitleID]/limits) to check more detailed usage limits of your title.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.