private static IEnumerator BatchNotificationSettings() { yield return(new WaitForEndOfFrame()); switch (s_NotificationActorLocation) { case NotificationLocation.LeftTop: UnitySocialBridge.UnitySocialShowNotificationActorOnLeftTop(s_NotificationActorOffset); break; case NotificationLocation.LeftBottom: UnitySocialBridge.UnitySocialShowNotificationActorOnLeftBottom(s_NotificationActorOffset); break; case NotificationLocation.RightTop: UnitySocialBridge.UnitySocialShowNotificationActorOnRightTop(s_NotificationActorOffset); break; case NotificationLocation.RightBottom: UnitySocialBridge.UnitySocialShowNotificationActorOnRightBottom(s_NotificationActorOffset); break; default: UnitySocialBridge.UnitySocialHideNotifications(); break; } s_UpdatingNotificationSettings = false; }
/// <summary> /// Gets or refreshes the current credential. /// If the access token is going to expire, refresh token is used to get a new access token. /// </summary> /// <param name="callback"></param> public void GetOrRefreshCredentialAsync(GenericCallback <UnitySocialCredential> callback) { #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR uint callbackId = Factory.callbackManager.Push(callback); UnitySocialBridge.UnitySocialUnityMessageReceived("getOrRenewCredentials", "{\"callbackId\":" + callbackId + "}"); #else callback("Unity Social is not enabled", null); #endif }
private static void UpdateNotificationSettings() { if (!s_UpdatingNotificationSettings) { if (UnitySocialBridge.GetBridge() != null) { UnitySocialBridge.GetBridge().StartCoroutine(BatchNotificationSettings()); } s_UpdatingNotificationSettings = true; } }
private static void UpdateEntryPointSettings() { if (!s_UpdatingEntryPointSettings) { if (UnitySocialBridge.GetBridge() != null) { UnitySocialBridge.GetBridge().StartCoroutine(BatchEntryPointSettings()); } s_UpdatingEntryPointSettings = true; } }
private static IEnumerator BatchEntryPointSettings() { yield return(new WaitForEndOfFrame()); if (entryPointUpdatesEnabled) { UnitySocialBridge.UnitySocialEnableEntryPointUpdatesWithImageSize(s_EntryPointImageSize); } else { UnitySocialBridge.UnitySocialDisableEntryPointUpdates(); } s_UpdatingEntryPointSettings = false; }
public float GetValue() { return(UnitySocialBridge.LeaderboardGetValue(m_Ptr)); }
/// <summary> /// Set color theme /// </summary> /// <param name="theme">Colors for theme</param> public static void SetColorTheme(Dictionary <string, string> theme) { UnitySocialBridge.UnitySocialSetColorTheme((theme != null) ? DictionaryExtensions.DictionaryToJson(theme) : null); }
/// <summary> /// EntryPointClicked /// </summary> public static void EntryPointClicked() { UnitySocialBridge.UnitySocialEntryPointClicked(); }