/// <summary> /// Checks if Cloud IDs match. /// </summary> /// <param name="otherConfig">Other <see cref="CloudConfig"/>.</param> /// <returns>If Cloud IDs match.</returns> public bool EqualsCloudIDs(CloudConfig otherConfig) { return(AchievementIDs.Count == otherConfig.AchievementIDs.Count && LeaderboardIDs.Count == otherConfig.LeaderboardIDs.Count && !AchievementIDs.Where((t, i) => !t.EqualsIDs(otherConfig.AchievementIDs[i])).Any() && !LeaderboardIDs.Where((t, i) => !t.EqualsIDs(otherConfig.LeaderboardIDs[i])).Any()); }
public void ReportScore(long score, LeaderboardIDs leaderboardID) { string leaderboard = ""; switch (leaderboardID) { case LeaderboardIDs.TopRunner: #if UNITY_IOS leaderboard = topRunnersIOSId; #elif UNITY_ANDROID leaderboard = topRunnersAndroidId; #endif break; case LeaderboardIDs.TopBitcoiner: #if UNITY_IOS leaderboard = topBitcoinersIOSId; #elif UNITY_ANDROID leaderboard = topBitcoinersAndroidId; #endif break; } if (Social.localUser.authenticated) { Debug.Log("Reporting score " + score + " on leader board " + leaderboard); Social.ReportScore(score, leaderboard, success => { if (success) { Debug.Log("Reported score successfully"); } else { Debug.Log("Failed to report score"); } }); } else { Debug.Log("Not authenticated"); } }