What is the future for building world space UI for XR?

In the future, what will be the preferred way of creating user interface in world space, particularly for XR applications? In XR, depth is important. Currently many XR experiences employ a flat user interface in screen space. Few employ depth along the Z-axis, although this could provide a more immersive experience for stereoscopic viewing. In addition, XR experiences can offer in-game user interfaces in world space (e.g. an ATM or a train ticket kiosk).

My understanding is the future preferred way of doing user interface is through the UI Toolkit, although documentation currently advises using Unity UI (uGUI) for world space user interfaces. Will the UI Toolkit have rich enough tools to enable 3d world space user interface, and if not, what will be the path for that going forward?

Hello,
This is a question, to complete the previous one.

We tried to make UITookit works with VR in worldspace, with no great results atm.
We first tried using mouse, rendertexture and setting the function “SetScreenToPanelSpaceFunction” in the PanelSettings and everything seems to work well!

Regarding VR, we tried to do the same thing, and we noticed that “SetScreenToPanelSpaceFunction” is not called every frame. As we do not move the mouse when in VR, the function is not called at all.
One solution we found is to add an EventSystem, but the result is a bit buggy.
Hovering roughly works with old input system (but not clicking) and clicking with the new input system (but not hovering).

We would like to know if it is possible to build a worldspace UI for XR with the current UIToolkit state? If yes, what are the best practices?

Thanks in advance for your reply!

1 Like

Quick answer is: yes, UI Toolkit will have rich “enough” tools for 3d/world space UI authoring. Those tools are still in their design phase so nothing specific to report. UI Toolkit is where Unity is investing most (and eventually all) of its UI resources into, so where there is still lack of parity with other UI frameworks you can assume we will or are already actively working on.

I’d actually submit a bug for this one. While you are in unsupported territory, if it’s something we can fix now to unblock you, we’ll do it.

As with my reply to your quote above, you are in unsupported territory, which means whatever works for you is “best practice” enough. This is why we still recommend uGUI for world space UI, like UI for VR/XR. We will at some point prioritize world space UI and have a lot more to share on this use case then. In the meantime, please do continue to ask questions and report bugs in this area as it will inform our future work (and we’ll try to unblock you where we can).

3 Likes