Beispiel #1
0
 /// <summary>
 /// Raises the show leaderboard event.
 /// </summary>
 public void OnShowLeaderboard()
 {
     if (Social.localUser.authenticated)
     {
         LeaderboardManagerIos.ShowLeaderboard();
     }
     else
     {
         LeaderboardManagerIos.AuthenticateToGameCenter();
     }
 }
 public void OnShowLeaderboard()
 {
             #if (UNITY_5 && UNITY_IOS) || UNITY_IOS
     if (Social.localUser.authenticated)
     {
         LeaderboardManagerIos.ShowLeaderboard();
     }
     else
     {
         LeaderboardManagerIos.AuthenticateToGameCenter();
     }
             #elif UNITY_ANDROID
     if (Social.localUser.authenticated)
     {
         Social.ShowLeaderboardUI();                      // Show all leaderboard
     }
     else
     {
         //GameObject.Find("Leaderboard").GetComponent<GPlayServices>().LogIn ();
     }
             #endif
 }