Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 /// <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
 }
Esempio n. 3
0
 private static void UpdateNotificationSettings()
 {
     if (!s_UpdatingNotificationSettings)
     {
         if (UnitySocialBridge.GetBridge() != null)
         {
             UnitySocialBridge.GetBridge().StartCoroutine(BatchNotificationSettings());
         }
         s_UpdatingNotificationSettings = true;
     }
 }
Esempio n. 4
0
 private static void UpdateEntryPointSettings()
 {
     if (!s_UpdatingEntryPointSettings)
     {
         if (UnitySocialBridge.GetBridge() != null)
         {
             UnitySocialBridge.GetBridge().StartCoroutine(BatchEntryPointSettings());
         }
         s_UpdatingEntryPointSettings = true;
     }
 }
Esempio n. 5
0
        private static IEnumerator BatchEntryPointSettings()
        {
            yield return(new WaitForEndOfFrame());

            if (entryPointUpdatesEnabled)
            {
                UnitySocialBridge.UnitySocialEnableEntryPointUpdatesWithImageSize(s_EntryPointImageSize);
            }
            else
            {
                UnitySocialBridge.UnitySocialDisableEntryPointUpdates();
            }
            s_UpdatingEntryPointSettings = false;
        }
Esempio n. 6
0
 public float GetValue()
 {
     return(UnitySocialBridge.LeaderboardGetValue(m_Ptr));
 }
Esempio n. 7
0
 /// <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);
 }
Esempio n. 8
0
 /// <summary>
 /// EntryPointClicked
 /// </summary>
 public static void EntryPointClicked()
 {
     UnitySocialBridge.UnitySocialEntryPointClicked();
 }