Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Oculus SDK performance issues when project is launched from Unity Hub

ezra_vrezra_vr Posts: 1
NerveGear
We recently upgraded our Oculus Unity Integration from v1.36 to v16 and noticed the behavior I'm about to describe. I'm also able to reproduce it in a new project with just the Oculus Unity Integration package and the sample scenes included with it. It's...weird.

I'm using Unity 2018.4.4f1, building for standalone (but have also tried with Android), using a Rift CV1. I have a Quest + Link attached to my PC as well, but it's not my active device (and is currently unplugged). Testing with the Assets/Oculus/Avatar/Samples/Controllers scene and the Assets/Oculus/Avatar/Samples/LocalAvatar scene.

When I launch the Unity Editor directly, every frame takes about 3ms. When I launch my project via Unity Hub (v2.3.1), every frame takes about 9ms, with the extra time going to:
  • XR.DeviceSDK (2.66ms)
  • OVRP_1_16_0.ovrp_GetControllerState4() (2.63ms)
  • OVRPlugin.UpdateNodePhysicsPoses() (1.18ms)
When I'm getting the 9ms frame times, I also see these messages in the Unity Editor log (not the console, but the "Open Editor Log" option available via right-clicking the console tab):

[OVRPlugin][ERROR] Device required
^ (logged one time)

[OVRPlugin][ERROR] ovr_GetCurrentHandInputState failed: ovr_GetCurrentHandInputState: Only Oculus Link is supported.
^ (spammed in the log over and over)

At this point, I should clarify: it's not a given that launching from the Unity Hub will trigger the degradation in performance, it just has a very good chance of making it happen. I've launched Unity over and over, both from the hub and without it, and launching from the hub almost always triggers this degradation, but occasionally it doesn't. Similarly, I've seen this happen when launching the editor directly, but it's very rare. All of this leads me to believe that there's some sort of race condition during plugin initialization that might be exacerbated by the extra time Unity takes to set up IPC between editor <-> hub (which it doesn't do when the editor is launched directly).

I haven't had time to test this in every version of the Oculus Unity Integration SDK, but I've found that it happens in v16, v15, and v14, and I haven't managed to reproduce it in v1.36 or v12.

Whatever is happening here could also be the underlying cause of these issues:
https://forums.oculusvr.com/developer/discussion/89263/massive-cpu-usage-by-ovrmanager-update-talking-to-ovrplugin-in-v16
https://forums.oculusvr.com/developer/discussion/89040/ovrinput-updates-killing-performance

Comments

  • jstarrdewarjstarrdewar Posts: 26
    Brain Burst
    Yep we're seeing it too, on any computer with an old-school Rift attached. Also happening in v17.
Sign In or Register to comment.