Support overlay mode?
See original GitHub issueIs Valve willing to support using the SteamVR Unity Plugin for creating SteamVR Overlays?
After experimenting a bit and digging into the code. It appears as if nearly everything needed to make overlays is available in the plugin. There’s enough here it would likely be more productive to tweak the plugin to support overlays, than to implement overlays from scratch using openvr_api.
From what I can tell, the primary thing stopping overlays built in Unity with this plugin from being viable is that when Unity’s XR handling – which initializes itself as a scene renderer – is disabled so you can initialize your app as overlay-only. The SteamVR class decides it cannot function and never creates an instance. And as a result the majority of the plugin just simply fails on SteamVR.instance
. Even when the code is just doing something as simple as checking the textureType. Even when the code doesn’t need UnityXR’s rendering. And even though the plugin already appears to do most of the pose tracking, etc… itself without UnityXR.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:13
I’m already building an overlay using the SteamVR Plugin: https://github.com/dantman/elite-vr-cockpit
I have the Unity XR stuff disabled. I init the overlay stuff myself. And I copy a few parts of the SteamVR plugin like the EventLoop for which the built-in one doesn’t run because the StreamVR Plugin disabled itself. The one caveat is there are some places like SteamVR Input that I can’t copy things to get working because the references to the
SteamVR
class assuming that it’s running are too hardcoded.The latter two things should not be required. The plugin already has a built in event loop and APIs like the Input API also seem to work in an overlay. The only problem is that when the
SteamVR
class that everything depends on starts up and sees that Unity XR is not running (because custom overlay code is running instead) and then shuts down completely and turns very simple calls to non-UnityXR things like getting the SteamVR Plugin’s own settings values, into fatal errors. And does not allow things like the event loop to start up (which does not actually rely on Unity XR).Do you have an upgraded the overlay in OpenXR?