예제 #1
0
        public static void ShowPlayGameCenterLeaderboards()
        {
            if (!PlayGameCenterManager.isAuthenticated)
            {
                PlayGameCenterManager.TryAuthentication(true);
            }
#if UNITY_IOS || UNITY_TVOS
            GameCenterBinding.showLeaderboardWithTimeScope(GameCenterLeaderboardTimeScope.AllTime);
#elif UNITY_ANDROID && !CHS
            PlayGameServices.showLeaderboards();
#endif
        }
예제 #2
0
        public static void ShowPlayGameCenterAchievements()
        {
            if (!PlayGameCenterManager.isAuthenticated)
            {
                PlayGameCenterManager.TryAuthentication(true);
            }
#if UNITY_IOS || UNITY_TVOS
            GameCenterBinding.showAchievements();
#elif UNITY_ANDROID && !CHS
            PlayGameServices.showAchievements();
#endif
        }
예제 #3
0
        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
        }