Leaderboard Object
Last updated
Last updated
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Represents a Steam Leaderboard and is used by the Steam Settings object to initalize the Leaderboard system. This is a wrapper around the LeaderboardData object making it a referenceable Unity object.
You create leaderboard objects through thee Steam Settings object by clicking the + New button in the leaderboards list.
From the Steam Settings you can mark the leaderboard as create if missing by ticking the toggle to the left of the name.
You can specify the number of detail entries the board should handle by entering a number in the Details field
Each board can handle up to 64 details and no more than that
If your marking your board as Create if Missing e.g. you have ticked the box as indicated above then you should also set the display type and sorting order by selecting the leaderboard in your Steam Settings and editing its values.
None is an available but invalid option for both settings
Why even show it if its invalid, ask Valve, its part of the enums they provide so we expose it.
Invoked when the local user's entry in this board is updated, the handler for this event should take the form of.
If true then when the system loads it will search for this board and if not found it will create a new board with settings matching it.
Defines the ELeaderboardSortMethod to be used **if** this board is created new
Defines the ELeaderboardDisplayType to be used **if** this board is created new
The API name of the board
The community display name of the board if any, this is only reinvent for boards created in the Steam Developer Portal and that have been assigned a community name.
How many detail entries should be allowed on entries from this board, this is used by quires and doesn't prevent you from adding more or fewer. It is only a hint used by query tools to know how many to watch for.
The underlying LeaderboardData object, this is what does all the actual work.
True if the board's ID is valid, false otherwise.
Returns the number of records found for this board.
Queries for the local user's entry on this board and invokes the callback when and if found.
maxDetailEntries This indicates how many if any detail entries should be read for each entry on the board. To understand detail entries better please read the article on Steam Leaderboards.
callback A method to be invoked when the process completes
The callback should take the form of
Queries the leaderboard for the top number of entries.
count How many top records should be read
maxDetailEntries This indicates how many if any detail entries should be read for each entry on the board. To understand detail entries better please read the article on Steam Leaderboards.
callback A method to be invoked when the process completes
The callback should take the form of
Returns all entries on this board
maxDetailEntries This indicates how many if any detail entries should be read for each entry on the board. To understand detail entries better please read the article on Steam Leaderboards.
callback A method to be invoked when the process completes
The callback should take the form of
request The type of query you want to run ... See ELeaderboardDataRequest for details
start The index to start downloading entries.
end The index to stop downloading entries.
maxDetailEntries This indicates how many if any detail entries should be read for each entry on the board. To understand detail entries better please read the article on Steam Leaderboards.
callback A method to be invoked when the process completes
users The set of users you want to read records for.
maxDetailEntries This indicates how many if any detail entries should be read for each entry on the board. To understand detail entries better please read the article on Steam Leaderboards.
callback A method to be invoked when the process completes
The callback should take the form of
Finds or creates the board according to configuration values. This is handled by the internal system for all boards defined at development time but must be called manually if you define this object at run time.
score The score to upload
method The ELeaderboardUploadScoreMethod to be used on upload
callback A method to be invoked when the process completes
score The score to upload
scoreDetails Additional details to add to the entry if accepted
method The ELeaderboardUploadScoreMethod to be used on upload
callback A method to be invoked when the process completes
The callback should take the form of
Similar to upload score this is a simplified set of upload score commands that assumes you wish to use the "Force Update" method e.g. you want the score to be applied rather or not it is the better value between the current score and the one you are uploading.
or
When uploading a string score the system will attempt to parse the score to an int value, this should only be used when your uploading score from a text field and is meant for testing not production use.
Similar to upload score this is a simplified set of upload score commands that assumes you wish to use the "Keep Best" method e.g. you want the best ranking value to be keep rather that is the score you are uploading or the user's current score.
or
When uploading a string score the system will attempt to parse the score to an int value, this should only be used when your uploading score from a text field and is meant for testing not production use.
fileName The name of the file to be saved, this is only used when created the file and can be removed or changed later without breaking the entry on the board
jsonObject Any "Serializable" object, we use Unity's JsonUtility to serialize your object to JSON for writing.
encoding (optional) the encoding method you want to use, if not provided we will use UTF8
callback A method to be invoked when the process completes
The callback should take the form of