cancel
Showing results for 
Search instead for 
Did you mean: 

Unity apps have black edges?

milkshakeiii
Explorer
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!
7 REPLIES 7

h.r.gargi
Heroic Explorer
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:) 
Meta Facebook Community Accelerator 2022 winner
Facebook Community Partner
Founder of the Meta Quest VR Familie - The largest German Facebook Group for VR and Metaverse
https://www.facebook.com/groups/oculusvrgermany/

milkshakeiii
Explorer
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!

milkshakeiii
Explorer
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!

MEDIUMLabs
Honored Guest
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"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
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>


milkshakeiii
Explorer
Thanks!  Changing it to LAUNCHER worked!

kingarrilla
Explorer
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.

SilentSonata
Honored Guest
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.