//============================================================================= public void DisplayAchievements() { #if UNITY_IPHONE GameCenterBinding.showAchievements(); #endif #if UNITY_ANDROID PlayGameServices.showAchievements(); #endif }
public void ShowAchievements() { if (IsSignedIn) { PlayGameServices.showAchievements(); } else { PlayGameServices.authenticate(); } }
public static void ShowPlayGameCenterAchievements() { if (!PlayGameCenterManager.isAuthenticated) { PlayGameCenterManager.TryAuthentication(true); } #if UNITY_IOS || UNITY_TVOS GameCenterBinding.showAchievements(); #elif UNITY_ANDROID && !CHS PlayGameServices.showAchievements(); #endif }
public void DisplayAchievementsList() { #if UNITY_ANDROID if (Enabled) { PlayGameServices.showAchievements(); } else { Login(); } #endif }
public void ShowAchievemetns(ButtonEventArgs args) { #if UNITY_IOS #if GAMECENTER #else Core.Utility.Popup.PopupMessages.Me.NativeFuncionNonAvailableMessage(); #endif #endif #if UNITY_ANDROID #if GPGSERVIES if (!PlayGameServices.isSignedIn()) { StartLeaderboard(); } else { PlayGameServices.showAchievements(); } #else Core.Utility.Popup.PopupMessages.Me.NativeFuncionNonAvailableMessage(); #endif #endif }
public void ShowAchievements() { Debug.Log("Showing Achievement"); PlayGameServices.showAchievements(); }
void OnGUI() { GUI.skin.label.alignment = TextAnchor.MiddleCenter; beginColumn(); GUILayout.Label("Authentication and Settings"); if (GUILayout.Button("Set Toasts on Bottom")) { PlayGameServices.setAchievementToastSettings(GPGToastPlacement.Bottom, 50); } if (GUILayout.Button("Authenticate")) { PlayGameServices.authenticate(); } if (GUILayout.Button("Sign Out")) { PlayGameServices.signOut(); } if (GUILayout.Button("Is Signed In")) { // Please note that the isSignedIn method is a total hack that was added to work around a current bug where Google // does not properly notify an app that the user signed out Debug.Log("is signed in? " + PlayGameServices.isSignedIn()); } if (GUILayout.Button("Get Player Info")) { var playerInfo = PlayGameServices.getLocalPlayerInfo(); Debug.Log(playerInfo); // if we are on Android and have an avatar image available, lets download the profile pic if (Application.platform == RuntimePlatform.Android && playerInfo.avatarUrl != null) { PlayGameServices.loadProfileImageForUri(playerInfo.avatarUrl); } } GUILayout.Label("Achievements"); if (GUILayout.Button("Show Achievements")) { PlayGameServices.showAchievements(); } if (GUILayout.Button("Increment Achievement")) { PlayGameServices.incrementAchievement("CgkI_-mLmdQEEAIQAQ", 2); } if (GUILayout.Button("Unlock Achievment")) { PlayGameServices.unlockAchievement("CgkI_-mLmdQEEAIQAw"); } endColumn(true); // toggle to show two different sets of buttons if (toggleButtonState("Show Cloud Save Buttons")) { secondColumnButtions(); } else { cloudSaveButtons(); } toggleButton("Show Cloud Save Buttons", "Toggle Buttons"); endColumn(false); }