Added Leaderboard.OnBoardInformation callback

This commit is contained in:
Garry Newman 2017-12-06 12:11:37 +00:00
parent 6e807c8e4d
commit d98f7fd1fe

View File

@ -100,6 +100,11 @@ private bool DeferOnCreated( Action onValid, FailureCallback onFailure = null )
return true; return true;
} }
/// <summary>
/// Called when the leaderboard information is successfully recieved from Steam
/// </summary>
public Action OnBoardInformation;
internal void OnBoardCreated( LeaderboardFindResult_t result, bool error ) internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
{ {
if ( error || ( result.LeaderboardFound == 0 ) ) if ( error || ( result.LeaderboardFound == 0 ) )
@ -114,6 +119,8 @@ internal void OnBoardCreated( LeaderboardFindResult_t result, bool error )
{ {
Name = client.native.userstats.GetLeaderboardName( BoardId ); Name = client.native.userstats.GetLeaderboardName( BoardId );
TotalEntries = client.native.userstats.GetLeaderboardEntryCount( BoardId ); TotalEntries = client.native.userstats.GetLeaderboardEntryCount( BoardId );
OnBoardInformation?.Invoke();
} }
} }