Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 3
0
 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
     }
 }