/// <summary> /// Sets the pop up location for toast notifications /// </summary> /// <param name="location">location enum value indicating the preferred position of toast</param> public static void SetPopUpLocation(GameCirclePopupLocation location) { #if UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS) // GameCircle only functions on device. #elif UNITY_ANDROID JavaObject.Call("setPopUpLocation", location.ToString()); #endif }
/// <summary> /// Displays the menu for initializing GameCircle /// </summary> private void DisplayInitGameCircleMenu() { if (GUILayout.Button(string.Format(pluginInitializationButton, pluginName))) { InitializeGameCircle(); } GUILayout.BeginHorizontal(); GUILayout.Label(GUIContent.none); GUILayout.BeginVertical(GUI.skin.box); GUILayout.Label(GUIContent.none); usesLeaderboards = GUILayout.Toggle(usesLeaderboards, usesLeaderboardsLabel); GUILayout.Label(GUIContent.none); usesAchievements = GUILayout.Toggle(usesAchievements, usesAchievementsLabel); GUILayout.Label(GUIContent.none); usesWhispersync = GUILayout.Toggle(usesWhispersync, usesWhispersyncLabel); AmazonGUIHelpers.AnchoredLabel(toastLocationLabel, TextAnchor.LowerCenter); if (null != toastLocations) { toastLocation = (GameCirclePopupLocation)GUILayout.SelectionGrid((int)toastLocation, toastLocations, 3); } GUILayout.Label(GUIContent.none); if (GUILayout.Button(enablePopups ? popupsEnabledLabel : popupsDisabledLabel)) { enablePopups = !enablePopups; } GUILayout.EndVertical(); GUILayout.Label(GUIContent.none); GUILayout.EndHorizontal(); }
/// <summary> /// Sets the pop up location for toast notifications /// </summary> /// <param name="location">location enum value indicating the preferred position of toast</param> public static void SetPopUpLocation(GameCirclePopupLocation location) { JavaObject.Call("setPopUpLocation", location.ToString()); }