private IEnumerator PollCoroutine() //Step 3 { do { deviceCodeExchanger.ExchangeAuthCode(limitedDeviceExchanger.DeviceCode); yield return(new WaitForSeconds(Convert.ToSingle(limitedDeviceExchanger.Interval))); } while (deviceCodeExchanger.IsPending); UserDeviceAuthorizationHandler.Close(); }
private void OnEnable() { if (instance == default) { instance = this; } else { enabled = false; } }
private void HandleLimitedDeviceExchanged(LimitedDeviceExchanger obj) { if (limitedDeviceExchanger.IsError) { Debug.LogError("UnityGoogleDrive: Failed to open device Portal"); HandleProvideAccessTokenComplete(true); } else { UserDeviceAuthorizationHandler.Open(limitedDeviceExchanger, PollCoroutine()); //Step 2 } }