Forum Discussion
ezra_vr
5 years agoHonored Guest
Oculus SDK performance issues when project is launched from Unity Hub
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:
^ (logged one time)
^ (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
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)
[OVRPlugin][ERROR] Device required[OVRPlugin][ERROR] ovr_GetCurrentHandInputState failed: ovr_GetCurrentHandInputState: Only Oculus Link is supported.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
2 Replies
Replies have been turned off for this discussion
- AnonymousYep we're seeing it too, on any computer with an old-school Rift attached. Also happening in v17.
- tzmtnExplorerWe are also seeing this, thanks for posting the workaround. We are using Unity 2019.3.15f1 by the way and we had to double click the scene file in order to bypass the hub
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 1 year ago
- 2 years ago
- 20 days ago
- 2 months ago