Example #1
0
 //-------------------------------------------------------------------------------------------------------------
 public void GetTinyQRCode(ShowMyAppDelegateQRCode sDelegate)
 {
     if (TinyQRCodeRequest == false)
     {
         TinyQRCodeRequest = true;
         StartCoroutine(GetTinyQRCodeAsync(sDelegate));
     }
 }
Example #2
0
 //-------------------------------------------------------------------------------------------------------------
 #region Get QRCode
 public void GetQRCode(ShowMyAppDelegateQRCode sDelegate)
 {
     if (Tiny == true)
     {
         GetTinyQRCode(sDelegate);
     }
     else
     {
         GetFullQRCode(sDelegate);
     }
 }
Example #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;
        }