leaderboardmanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.LeaderboardManager
The LeaderboardManager is used for fetching and finding leaderboards that exist for the current game.
List<Leaderboard> Leaderboards
Stores all the Leaderboards contained in the Manager.
Adds a Leaderboard to the internally managed list without persistence.
Note
This method is deprecated
Returns void
LeaderboardManager.Add( leaderboard )
Leaderboard leaderboard
Instance of a Leaderboard to add internally
--------------------------------------------------------------------------------Finds the Leaderboard with the specified LeaderboardID if it exists, otherwise returns null
Returns Leaderboard
LeaderboardManager.FindByLeaderboardID( leaderboardID )
long leaderboardID
The ID of the Leaderboard to find
--------------------------------------------------------------------------------Gets the number of Leaderboards currently managed internally.
Returns int
LeaderboardManager.GetCount( )
Gets the Leaderboard at the specified index if it exists, otherwise returns null.
Returns Leaderboard
LeaderboardManager.Get( index )
int index
The index of the Leaderboard to find
--------------------------------------------------------------------------------Returns the index of the specified Leaderboard if it exists, otherwise returns -1.
Returns int
LeaderboardManager.IndexOf( leaderboard )
Leaderboard leaderboard
Instance of the Leaderboard to find the index of
--------------------------------------------------------------------------------Returns the index of the Leaderboard with the specified LeaderboardID if it exists, otherwise returns -1.
Returns int
LeaderboardManager.IndexOfByLeaderboardID( leaderboardID )
long leaderboardID
The ID of the Leaderboard to find the index of
--------------------------------------------------------------------------------Removes a Leaderboard from the internally managed list. This does not delete the leaderboard from the game persistently.
Note
This method is deprecated
Returns void
LeaderboardManager.Remove( index )
int index
The index of the Leaderboard to be removed
--------------------------------------------------------------------------------Deletes a Leaderboard. Upon success, this will automatically update the internal list.
Returns void
LeaderboardManager.Delete( leaderboardID, callbackFunc )
long leaderboardID
The ID of the Leaderboard to delete
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion
--------------------------------------------------------------------------------Gets all Leaderboards for the current session's Game or a particular User.
Returns void
LeaderboardManager.GetAll( getForUserID, callbackFunc )
long getForUserID
The ID of the User to retrieve Leaderboards for. Pass 0 to fetch all Leaderboards.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------