Overlay HTML in VR

Hi,

is there a reliable way to overlay HTML elements in VR mode? Afaik dom-overlay only supports AR? We tried different approaches, but so far it seems this is not possible?

For context: It’s not even about interaction, but passive information e.g. Toasts, etc.

Thanks again!

Original Post on Discord

by user 827095900392259645

Hi, I tried smth similar with WorldSpace canvas following the camera movement (like a HUD). Works, but may not be the best solution ^^

by user 474974683163394049

Hey, so you can either do a HTMLMesh in VR (see for example three.js examples) or you can use a world space canvas with regular UI elements set up in Unity

You’re right that VR doesn’t support dom-overlay, it’s intended for screen-based devices (e.g. phones in AR mode)

Thanks! We already had a look into HTMLMesh, I was just hoping to find a more native approach :slightly_smiling_face: Since we target both, Desktop and VR I was hoping to have a solution that worked for both

by user 827095900392259645

So ultimately we want to build an approach where you can use UI or UIToolkit in Unity and we map that to both 3D objects and HTML. That’s the plan, but not there yet :slightly_smiling_face: