cancel
Showing results for 
Search instead for 
Did you mean: 

Terrible build performance with URP and Meta SDK, conflicting information in documentation

erikbaender
Explorer

 

Hi everyone,
 
The Unity setup guide on Meta Developers says to use the Universal 3D template, and it even mentions Unity 6 and makes a distinction to use the Oculus plugin before and Open XR plugin after, which to me seemed like a good sign that the documentation is well maintained.
 
However, if you keep following the documentation you will quickly run into errors caused by Meta XR SDK not being designed for anything other the the built-in RP. First I thought it was just the Interaction SDK samples not having been updated to URP, there are lots of broken built-in RP shaders like the water or mirror material in the locomotion example. That wouldn't be a big deal, but it's also coming straight from the core building blocks that you need to use. Even the most basic thing, the camera rig, immediately raises a red flag by causing this warning in the console:

 

Your project uses a scriptable render pipeline. You can use Camera.stereoTargetEye only with the built-in renderer.
UnityEngine.Camera:set_stereoTargetEye (UnityEngine.StereoTargetEyeMask)
OVRCameraRig:EnsureGameObjectIntegrity () (at ./Library/PackageCache/com.meta.xr.sdk.core@e9f929748630/Scripts/OVRCameraRig.cs:611)
OVRCameraRig:Awake () (at ./Library/PackageCache/com.meta.xr.sdk.core@e9f929748630/Scripts/OVRCameraRig.cs:196)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

 

And sure enough, if you build those examples scenes and run them on a Quest 3, you will get horrible performance even though there is barely anything to render. It's stuttering constantly unless you turn on passthrough to reduce rendering load to an absolute minimum. I don't think the URP configuration is to blame for this, the documentation makes no mention of changing the default URP settings by yourself and the Meta project setup tool already made all the changes it was supposed to and shows no further errors or warnings.
 
If you set up the exact same project in the built-in RP, the console warning from the camera rig script no longer appears and the build runs fine even without passthrough. I don't get it though, why would Meta explicitly tell you to use the URP if their own SDK does not support it? It literally tells you to install that SDK package right in the next paragraph of that exact same documentation page.
3 REPLIES 3

Kotowicz.Si2G
Explorer

Hi Erik,

I've just reached this "Your project uses a scriptable render pipeline. You can use Camera.stereoTargetEye only with the built-in renderer" stage on my l;atest VR project.

What's the fix?  Are we supposed to just use the Built-In Renderer?  Did you get an answer from anywhere?  Did you fix it yourself?

Hope it's all going well!!!

Simon

erikbaender
Explorer

Hi Simon,

Unfortunately Meta is still ignoring this glaring issue and won't give any explanation. I also tried to reach out in the Unity developer community, one other developer confirmed the issue.

You can use the Universal RP, but even with the optimized RP settings from Unity's own mixed reality template performance will still suffer massively over using the built-in RP. Looks like we're stuck developing for the Quest 3 with a decades old rendering pipeline.

Cool.  I did start my project over again with a Built-In Renderer profile and it's working nicely... ish.  There are other issues, like it loses it's XR Interaction  control profile when exiting.  Easy to fix each time I come back.

It makes you wonder how many people give up right at the very start....