Unity apps have black edges? — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Unity apps have black edges?

milkshakeiiimilkshakeiii Posts: 7
NerveGear
edited July 29 in Oculus Quest
Hello,

I am working on oculus quest development using Unity.  No matter what settings I change or which project I'm in, my app always has black edges before the eye cups end on the quest.  In other words, before the screen ends on the left, right, and bottom sides, the rendering ends and there is blackness.  This happens in the demo scenes from the oculus asset, for example.

Is anyone else experiencing this or does anyone have a solution?

Thanks!

Comments

  • h.r.gargih.r.gargi Posts: 69
    Hiro Protagonist
    edited July 29
    Update Unity and get the latest Oculus integration
    1.) In Unity: Oculus -> Tools -> Remove AndroidManifest.xml
    2.) In Unity: Oculus -> Tools -> Create store-compatible AndroidManifest.xml
    3.) Edit Asstes/Plugins/Adroid/assets/AndroidManifest.xml
    4.) Before <!-- Request the headset DoF mode --> insert this line
    <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
    Save the changes and recompile. For me it did the trick. Please report if it fixes it for you too. If not maybe too much alcohol  o:) 
  • milkshakeiiimilkshakeiii Posts: 7
    NerveGear
    edited July 30
    I greatly appreciate your response!

    After using the tools menu to remove and create the AndroidManifest.xml, the line you gave me was already there, interestingly enough.  Also, the app does not seem to open when deployed when using that AndroidManifest.xml.  When I delete the AndroidManifest.xml I get back to the app opening but having back edges.

    However, I am still using Unity 2019.1.12 .  You mentioned I should update Unity so I will update to 2019.2 and try again and report back.  Thanks again!

  • milkshakeiiimilkshakeiii Posts: 7
    NerveGear
    Okay, other than that the app does not automatically open after "build and run" now, everything is working and the edges seem to be gone!  Thanks for your help!
  • MEDIUMLabsMEDIUMLabs Posts: 2
    NerveGear
    The AndroidManifest.xml seems to be the key. I am using UnityEngine.XR to handle my VR stuff, so I have been trying to find an Oculus independent option. Creating an AndroidManifest under Assets/Plugins/Android seems to work. As far as the app not running when you hit "Build and Run", I found if you replace the Category intent line with LAUNCHER instead of INFO, it works. Don't know if it has to be INFO for the oculus store, but for dev, it's nice to be able to hit build and run. I generated an XML using the oculus menu (then removed the integration plugin again) and modified it slightly. Mine looks like this:

    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    android:installLocation="auto">
    <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
    <!-- Request the headset DoF mode -->
    <application
    android:allowBackup="false">
    <activity
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
    android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
    android:launchMode="singleTask"
    android:name="com.unity3d.player.UnityPlayerActivity"
    android:excludeFromRecents="true">
    <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    </activity>
    <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
    </application>
    </manifest>


  • milkshakeiiimilkshakeiii Posts: 7
    NerveGear
    Thanks!  Changing it to LAUNCHER worked!
  • kingarrillakingarrilla Posts: 7
    NerveGear
    Changing it to LAUNCHER worked for me too!

    The new manifest already had <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /> 

    This also had the effect of making controllers be the Quest Touch controller and not the Go controller.
  • SilentSonataSilentSonata Posts: 1
    NerveGear
    I am now having the same exact issue as described above but I am using ue4 instead of unity and can not figure out how to fix the black edges on left, right and bottom.
Sign In or Register to comment.