30 void qrEncodeFinished(Texture2D tex)
32 if (tex !=
null && tex !=
null)
34 var width = tex.width;
35 var height = tex.height;
36 var aspect = width * 1.0f / height;
37 qrCodeImage.GetComponent<RectTransform>().sizeDelta =
new Vector2(170, 170.0f / aspect);
59 infoText.text =
"Must contain 12 digits,the 13th digit is automatically added !";
61 else if (errorlog == -8)
63 infoText.text =
"Must contain 7 digits,the 8th digit is automatically added !";
65 else if (errorlog == -39)
67 infoText.text =
"Only support digits";
69 else if (errorlog == -128)
71 infoText.text =
"Contents length should be between 1 and 80 characters !";
73 else if (errorlog == -1)
75 infoText.text =
"Please select one code type !";
77 else if (errorlog == 0)
80 infoText.text =
"Encode successfully !";
static void SaveImageToGallery(Texture2D qrCode)
int Encode(string valueStr)
Encode the specified string .
QREncodeFinished onQREncodeFinished
QRCodeEncodeController e_qrController
void setCodeType(int typeId)