public override void Update() { base.Update(); // deferred callbacks _deferred.Dispatch(); }
public void Update() { _deffered.Dispatch(); #if UNITY_IPHONE if (!_gotToken) { var token = UnityEngine.iOS.NotificationServices.deviceToken; if (token != null) { _gotToken = true; var tokenHex = Encoding.ToHexString(token); EB.Debug.Log("Got push token " + tokenHex); _api.SetApplePushToken(tokenHex, OnSentApplePushToken); } else if (!string.IsNullOrEmpty(UnityEngine.iOS.NotificationServices.registrationError)) { _gotToken = true; EB.Debug.LogWarning("failed to register for push token : " + UnityEngine.iOS.NotificationServices.registrationError); } } #elif UNITY_ANDROID if (!_gotToken) { // string androidID = OtherLevelsSDK.androidToken; // if(!string.IsNullOrEmpty(androidID)) // { // if (OtherLevelsPlugin.Instance != null) // { // OtherLevelsPlugin.Instance.deviceToken = androidID; // } // _gotToken = true; // } } #endif }
public override void Update() { // dispatch calls on _deferred.Dispatch(); }