I'm currently at a bit of a loss as to how to use Unity to post a score to a leaderboard. At the moment I have it triggering an event using:
logEventRequest("EVT").sendAsync(onResult);
However this can only trigger a pre-defined event and doesn't appear to give me any way to specify what the score being uploaded is. If I hard-code a value into the event server-side, triggering that event will add the score, but obviously a leaderboard where the score you post has nothing to do with the score you got isn't much use. This might be a stupid question, but what SHOULD I be doing? The manual doesn't have anything I can see by way of example Unity code.
Best Answer
C
Customer Support
said
over 7 years ago
Hi Michael,
For more information on this check out our Unity Leaderboards tutorial, it explains this process in detail and includes an example project that you can work through step by step.
Nevermind I figured it out, you just append an addParameter() function call between the logEventRequest and the sendAsync.
Customer Support
said
over 7 years ago
Answer
Hi Michael,
For more information on this check out our Unity Leaderboards tutorial, it explains this process in detail and includes an example project that you can work through step by step.
Michael Murphy
Hi
I'm currently at a bit of a loss as to how to use Unity to post a score to a leaderboard. At the moment I have it triggering an event using:
logEventRequest("EVT").sendAsync(onResult);
However this can only trigger a pre-defined event and doesn't appear to give me any way to specify what the score being uploaded is. If I hard-code a value into the event server-side, triggering that event will add the score, but obviously a leaderboard where the score you post has nothing to do with the score you got isn't much use. This might be a stupid question, but what SHOULD I be doing? The manual doesn't have anything I can see by way of example Unity code.
Hi Michael,
For more information on this check out our Unity Leaderboards tutorial, it explains this process in detail and includes an example project that you can work through step by step.
Thanks,
Liam
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstMichael Murphy
Nevermind I figured it out, you just append an addParameter() function call between the logEventRequest and the sendAsync.
Customer Support
Hi Michael,
For more information on this check out our Unity Leaderboards tutorial, it explains this process in detail and includes an example project that you can work through step by step.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics