Example #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
 }
Example #3
0
 /// <summary>
 /// Raises the login event.
 /// </summary>
 /// <param name="id">Identifier.</param>
 public void OnLogin(string id)
 {
     LeaderboardManagerIos.AuthenticateToGameCenter();
 }
Example #4
0
 void Start()
 {
                     #if (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
     LeaderboardManagerIos.AuthenticateToGameCenter();
                     #endif
 }