Hi,
I'm new to PlayFab, and I'm using Unity 5.
How to return value to Unity after call server.GetLeaderboard ?
Thanks.
Hi,
I'm new to PlayFab, and I'm using Unity 5.
How to return value to Unity after call server.GetLeaderboard ?
Thanks.
First, Server API calls should only ever be used from a server - either your own, or in Cloud Script, as you must use the Secret Key for your game to make these calls (and you should never ship that with your game).
When you call GetLeaderboard (whether from the Server or Client API), the response contains the leaderboard info. You can see examples of API calls and responses in our GitHub samples.
The basic Cloud Script sample is automatically Revision 1 in your Server->Cloud Script settings for all new titles, but you can also find it here: https://github.com/PlayFab/CloudScriptSamples/blob/master/BasicSample/basic_sample.js.
A Unity C# sample showing how to use leaderboards (and many other features) would be our MOBA sample, Union: https://github.com/PlayFab/UNION-OpenSource-MOBA.
No one has followed this question yet.