last update

This commit is contained in:
2022-12-28 13:43:10 +05:00
parent de27cee945
commit 9486dbcb03
12 changed files with 4653 additions and 2003 deletions
+12 -11
View File
@@ -63,21 +63,24 @@ public class QRCodeReader : MonoBehaviour
var ratio = (float)camTexture.width / (float)camTexture.height;
aspectRatioFitter.aspectRatio = ratio;
float scaleY = 1;
float scaleY = -1;
if(Application.platform == RuntimePlatform.Android)
{
scaleY = camTexture.videoVerticallyMirrored ? -1f : 1f;
rawImage.rectTransform.localScale = new Vector3(1f, scaleY, 1f);
}
else
{
ratio = (float)camTexture.height / (float)camTexture.width;
rawImage.rectTransform.localScale = new Vector3(1f, -1f, 1f);
}
rawImage.rectTransform.localScale = new Vector3(1f, scaleY, 1f);
ScanningQRCode();
}
// void Update()
// {
// cameraCrop = new Texture2D(camTexture.width, camTexture.height);
// cameraCrop.SetPixels32(camTexture.GetPixels32());
// cameraCrop.Apply();
// cropImage.texture = cameraCrop;
// }
public void ScanningQRCode()
{
if(c_QRScanningRoutine != null)
@@ -112,8 +115,6 @@ public class QRCodeReader : MonoBehaviour
yield return new WaitForSeconds(.5f);
}
yield return new WaitForSeconds(1);
if(!loadingCanvas.gameObject.activeSelf)
loadingCanvas.gameObject.SetActive(true);