예제 #1
0
 //-------------------------------------------------------------------------------------------------------------
 public void GetTinyQRCode(ShowMyAppDelegateQRCode sDelegate)
 {
     if (TinyQRCodeRequest == false)
     {
         TinyQRCodeRequest = true;
         StartCoroutine(GetTinyQRCodeAsync(sDelegate));
     }
 }
예제 #2
0
 //-------------------------------------------------------------------------------------------------------------
 #region Get QRCode
 public void GetQRCode(ShowMyAppDelegateQRCode sDelegate)
 {
     if (Tiny == true)
     {
         GetTinyQRCode(sDelegate);
     }
     else
     {
         GetFullQRCode(sDelegate);
     }
 }
예제 #3
0
        //-------------------------------------------------------------------------------------------------------------
        private IEnumerator GetTinyQRCodeAsync(ShowMyAppDelegateQRCode sDelegate)
        {
            string tURI = website + "qrcode.php?t=1&" + GetParam();

            Debug.Log("GetTinyQRCodeAsync() => tURI = " + tURI);
            UnityWebRequest www = UnityWebRequestTexture.GetTexture(tURI);

            yield return(www.SendWebRequest());

            if (www.isNetworkError || www.isHttpError)
            {
                Debug.Log(www.error);
            }
            else
            {
                TinyQRCode = ((DownloadHandlerTexture)www.downloadHandler).texture;
                sDelegate?.Invoke(TinyQRCode);
            }
            TinyQRCodeRequest = false;
        }