예제 #1
0
    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");
        }
    }
예제 #2
0
        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>());
            }
        }