public static async void GetLevelLeaderboard(string levelLeaderboardName) { var leaderboard = await SteamUserStats.FindLeaderboardAsync(levelLeaderboardName); if (leaderboard.HasValue) { Steamworks.Data.Leaderboard unwrappedLeaderboard = leaderboard.Value; } else { Debug.LogError($"Could not retrieve leaderboard {levelLeaderboardName} from steam"); } }
public static async Task <List <LeaderboardEntry> > FindLeaderboard(string name, int entryCount) { var leaderboard = await SteamUserStats.FindLeaderboardAsync(name); if (leaderboard.HasValue) { return(GetLeaderboardScores(leaderboard.Value, entryCount).Result); } else { return(new List <LeaderboardEntry>()); } }