public void ShowLeaderboard() { #if UNITY_IPHONE || UNITY_ANDROID // show leaderboard UI PlayGameServices.showLeaderboard(_leaderboardID, GPGLeaderboardTimeScope.AllTime); #endif }
public static void ShowPlayGameCenterLeaderboard(Leaderboard leaderboard, TimeScope timeScope = TimeScope.AllTime) { if (!instanceExists) { return; } if (!PlayGameCenterManager.isAuthenticated) { PlayGameCenterManager.TryAuthentication(true); } #if UNITY_IOS || UNITY_TVOS GameCenterBinding.showLeaderboardWithTimeScopeAndLeaderboard(TimeScope2GameCenterLeaderboardTimeScope(timeScope), instance.leaderboardInfos[(int)leaderboard].leaderboardId); #elif UNITY_ANDROID && !CHS PlayGameServices.showLeaderboard(instance.leaderboardInfos[(int)leaderboard].leaderboardId); #endif }
private void secondColumnButtions() { GUILayout.Label("Leaderboards"); if (GUILayout.Button("Show Leaderboard")) { PlayGameServices.showLeaderboard("CgkI_-mLmdQEEAIQBQ", GPGLeaderboardTimeScope.AllTime); } if (GUILayout.Button("Show All Leaderboards")) { PlayGameServices.showLeaderboards(); } if (GUILayout.Button("Submit Score")) { PlayGameServices.submitScore("CgkI_-mLmdQEEAIQBQ", 567); } if (GUILayout.Button("Load Raw Score Data")) { PlayGameServices.loadScoresForLeaderboard("CgkI_-mLmdQEEAIQBQ", GPGLeaderboardTimeScope.AllTime, false, false); } if (GUILayout.Button("Get Leaderboard Metadata")) { var info = PlayGameServices.getAllLeaderboardMetadata(); Prime31.Utils.logObject(info); } if (GUILayout.Button("Get Achievement Metadata")) { var info = PlayGameServices.getAllAchievementMetadata(); Prime31.Utils.logObject(info); } if (GUILayout.Button("Reload All Metadata")) { PlayGameServices.reloadAchievementAndLeaderboardData(); } }
public void Show() { #if UNITY_ANDROID Debug.Log("Try to show leaderboard."); if (PlayGameServices.isSignedIn()) { Debug.Log("SignedIn. ShowLeaderboard."); PlayGameServices.showLeaderboard(_leaderboardId); } else { Debug.Log("Not SidngedIn. Authenticate."); PlayGameServices.authenticate(); } #else Debug.Log("Error. AndroidLeaderboard.Show call for not android platform."); #endif }
public void ShowLeaderBoard() { Debug.Log("Showing Leaderboard"); PlayGameServices.reloadAchievementAndLeaderboardData(); PlayGameServices.showLeaderboard("CgkIr87MtK4BEAIQAA"); }
void ShowLeaderboard() { PlayGameServices.submitScore("CgkItJD32NYKEAIQAQ", GameManager.cookiesTotal); PlayGameServices.showLeaderboard("CgkItJD32NYKEAIQAQ", GPGLeaderboardTimeScope.AllTime); }