question

Gilbert Villanueva avatar image
Gilbert Villanueva asked

Cannot get leaderboard to post scores

So I am testing out the PlayFab Leaderboards sample located here:

https://github.com/PlayFab/PlayFab-Samples/tree/master/Samples/Unity/PlayFabLeaderboardsUnity

I was able to compile the file and see the data being sent to PlayStream. However, there is no clear instructions on how I am supposed to get that PlayStream data to the cloudscripts. Am I supposed to add Actions for it? If so, what do I enter for Arguments(JSON) if I select Execute Cloud Script? Please help, this is driving me insane.

Thank you much.

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

·
jital avatar image
jital answered

Hello,

In order to execute Cloudscript based off of Playstream events, you would have to create a new Rule in the GameManager, by selecting the proper triggering event.

Your JSON arguments include whatever JSON objects you would like the Cloudscript to perform actions on if any at all. Here is some documentation on using Cloudscript with Playstream.

2 comments
10 |1200

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

Gilbert Villanueva avatar image Gilbert Villanueva commented ·

Yes. But how do I get the JSON arguments from PlayStream to Actions in GameManager?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Gilbert Villanueva commented ·

If the Cloud Script function is triggered by event, you may use context.playStreamEvent to get the information, according to the documentation Writing Custom Cloud Script.

0 Likes 0 ·

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.