late goodbye
This commit is contained in:
@@ -63,8 +63,17 @@ public class QRCodeReader : MonoBehaviour
|
||||
var ratio = (float)camTexture.width / (float)camTexture.height;
|
||||
aspectRatioFitter.aspectRatio = ratio;
|
||||
|
||||
float scaleY = camTexture.videoVerticallyMirrored ? -1f : 1f;
|
||||
rawImage.rectTransform.localScale = new Vector3(1f, scaleY, 1f);
|
||||
float scaleY = 1;
|
||||
if(Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
scaleY = camTexture.videoVerticallyMirrored ? -1f : 1f;
|
||||
rawImage.rectTransform.localScale = new Vector3(1f, scaleY, 1f);
|
||||
}
|
||||
else if(Application.platform == RuntimePlatform.IPhonePlayer)
|
||||
{
|
||||
ratio = (float)camTexture.height / (float)camTexture.width;
|
||||
rawImage.rectTransform.localScale = new Vector3(1f, -1f, 1f);
|
||||
}
|
||||
|
||||
ScanningQRCode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user