Skip to content
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

Does not work with VR Games #25

Closed
v0idp opened this issue Mar 19, 2022 · 14 comments
Closed

Does not work with VR Games #25

v0idp opened this issue Mar 19, 2022 · 14 comments

Comments

@v0idp
Copy link

v0idp commented Mar 19, 2022

as the title says it does not support VR Games. no menu popping up. Plugin is loaded properly tho without errors.

@ManlyMarco
Copy link
Owner

Check if it shows up on the desktop preview. The game needs to have IMGUI view enabled in some way for it to work, either as desktop-only or rendered to a camera. A lot of games are probably not going to have anything set up here.

@v0idp
Copy link
Author

v0idp commented Mar 19, 2022

I did check the desktop preview. sadly no menu in there either

@andrewpros
Copy link

Anyone found a solution? I do know the UnityExplorer plugin somehow, but works.

@ManlyMarco
Copy link
Owner

UnityExplorer is visible because it uses a canvas for its interface instead of imgui.

@andrewpros
Copy link

Hmm, im not into the internals that much, does that mean the plug-in OnGUI and Update needs to work? And some games will just not call OnGUI?

@ManlyMarco
Copy link
Owner

The issue is that there is nothing to draw the UI to. I believe it's not possible to draw directly in the VR view, but it is possible to draw to the desktop preview camera and to a texture. I used the second way to enable plugins using OnGUI to be visible in VR on the desktop view tool in this mod https://github.com/IllusionMods/KKS_VR, but it relies on OpenXR which won't help here. I have some games that come with the first version working out of the box too, so it's definitely possible, I think it's a camera mask issue in this case.

@andrewpros
Copy link

Well ok, i guess legacy unity GUI is outdated anyway, that why it wont work with vr and there not much to do about it.

@v0idp
Copy link
Author

v0idp commented Jul 6, 2022

from my knowledge it is possible to draw imgui elements into VR. there is actually a fork of imgui for vr called imguivr or something which allows you to draw imgui overlays in all vr games. it uses openVR.

github: https://github.com/temcgraw/ImguiVR
demo: https://www.youtube.com/watch?v=nlwfn4HJw5E

@andrewpros
Copy link

Hmm, are we still talking about the same things and what it has to do with making RuntimeUnityEditor work in vr unity apps?

RuntimeUnityEditor is using unity IMGUI and this has nothing to do with c++ dear imgui.

IMGUI is basically the OnGUI event, at the same time IMGUI does not work with vr and it is kinda obsolete now so it will never in a official way.

But, maybe there is some hack to make it work or at least display on the desktop window without rewriting the whole thing...

Cuz i have heard that some vr games do display it still, but only on the desktop view, but im not sure how this is achieved.

But maybe some hacks are possible, like render the OnGui calls to a texture?

@v0idp
Copy link
Author

v0idp commented Jul 6, 2022

maybe the texture thing might work, you could draw a plane/cube or whatever into the game and put imgui as a texture on it

@andrewpros
Copy link

Its hard to find any info about it, no one cares really, and as it is legacy ui i wont look for it either, no point probably, it works in the vr app i tested, but op didn't specify what game it was, so i was curious.

@v0idp
Copy link
Author

v0idp commented Jul 7, 2022

The Game was VirtuosoVR I believe.

@andrewpros
Copy link

Works for me.

@v0idp
Copy link
Author

v0idp commented Jul 7, 2022

welp then I forgot... sorry

@v0idp v0idp closed this as completed Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants