-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow SteamVR Unity Plugin to run in "Standalone" mode without Unity XR enabled #336
base: master
Are you sure you want to change the base?
Conversation
…XR enabled Standalone mode is primarily intended for SteamVR overlays where it is undesirable for Unity to initialize itself as a VR application and render a scene. In order to run standalone: - autoEnableVR must be disabled in SteamVR_Settings - "Virtual Reality Supported" must be disabled in Unity's project settings - openvr_api.dll will not be handled by Unity so the dlls for the relevant platforms must be downloaded and included in the project with the proper import settings (you may need to manually copy the dlls into the standalone build version) - To initialize an overlay you must create a behaviour that calls `SteamVR.InitializeStandalone(EVRApplicationType.VRApplication_Overlay);` to enable SteamVR functionality - If you use SteamVR scripts that initialize SteamVR on Awake you may get initialization warnings if they run before your initialize behaviour - Since Unity's XR support is disabled you of course need to interact with the `OpenVR.overlay` directly in your own scripts Implements most of the functionality required by ValveSoftware#108
…ndalone * commit 'dc47fdeceda1b58a563ce3a619b5a4b08a4f4493': Version 2.3.2 (sdk 1.4.18) - updating readme and openvr_api.cs Version 2.3.2 - Added optional fix for Unity 2019.2b / 2019.3a 2.3.1b - Added no skeleton input fallback, bug fixes 2.3b2 - removed settings.asset Version 2.3b - GC/Perf fixes. Seated Universe fix. Misc api updates
Thank you for creating this patch. I tried it and it works. I hope Valve decides to merge it in. The SteamVR Unity Plugin is too restrictive in its current state. I'm working on an overlay project as well. I started with basic openvr api calls. I used other overlay projects to help figure things out. OpenVR is great, but its also pretty low level. A higher level api would be nice, and that's what SteamVR is. But SteamVR is not friendly to overlay developers, or anyone who wants to use SteamVR without Unity's VR Support enabled. When VR support is enabled, Unity takes over and does things I don't want. It kicks out other running VR apps, it hooks up the main camera to the hmd. Sure this is great if you are 90% of developers who just want to make a VR game. What about the rest? With this patch I was able to get SteamVR Input to work, and I was able to add certain SteamVR components to gameobjects and enable tracking of the contoller and hmd poses. This means I don't need to interface directly with OpenVR, now I can utilize all the SteamVR components that Valve spent so much time working on. Thank you! And +1 to merging this patch! |
Please consider merging this as at least an experimental option. Or review it and let me know what other way I should implement the API or what else should be added. Currently by leaving this as just a PR, I have to re-merge the standalone tweaks every time a new update I need is released. And because this is just a PR, the rare time that a change to the plugin causes an issue in overlay mode there is no place to report an issue, no easy way to fix it without increasing the likelihood of merge conflicts, and no place to discuss api improvements to help the plugin fit in with overlay usage. On that topic, while this PR's changes still work for enabling overlays made with the plugin to function. A recent change did create a new quirk in the plugin that causes issues. Version 2.3b (715bba3) added And related but not required, the CC: @zite |
3 years later and still doesn't support overlay as a first class solution? |
Standalone mode is primarily intended for SteamVR overlays where it is undesirable for Unity to initialize itself as a VR application and render a scene.
In order to run standalone:
SteamVR.InitializeStandalone(EVRApplicationType.VRApplication_Overlay);
to enable SteamVR functionalityOpenVR.overlay
directly in your own scriptsImplements most of the functionality required by #108