Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GVR stereo viewer doesn't fit the aspect ratio greater than 2 in Xiaomi phone

Discussion in 'AR/VR (XR) Discussion' started by jaguardigital, Oct 19, 2019.

  1. jaguardigital

    jaguardigital

    Joined:
    Sep 29, 2015
    Posts:
    5
    Hi there

    I'm using Unity 2019.02.f1 and Google VR 1.18.4 to develop a 360 video app for Android API 24

    The depicted issue I'm having occurs in a Xiaomi mi9 with 1080x2340 screen resolution and 2.16667 aspect ratio, it doesn't happen in a normal 1.777 aspect ratio mobile 1920x1080 screen. As you can see, it shows aproximately 7% of the video image outside the stereo mask (3.5% on each side), and the center vertical mark unaligned.

    unity google vr unaligned aspect ratio 2.1.jpeg

    Trying to correct it, when I change the "Aspect ratio mode" found at Unity "Player Settings" to "Custom", and assign the "Up to" value to 2.2 or any other float value, the Unity Console throws the following error:

    C:\Users\USER\Documents\Unity\360app\Temp\gradleOut\build\intermediates\merged_manifests\release\AndroidManifest.xml:50: AAPT: error: '2,2' is incompatible with attribute maxAspectRatio (attr) float

    So I exported the project to Android Studio, and changed manually the AndroidManifest.xml adding the parameters specified at https://developer.android.com/guide/practices/screens-distribution

    <activity android:resizeableActivity="false">
    <meta-data android:name="android.max_aspect" android:value="2.2" />

    Even adding those parameters the issue is not fixed, any ideas?
     
    Last edited: Oct 19, 2019