I am trying to create a UI Element in World Space for adorning some other GameObjects. However, a different forum suggests that UI Elements doesn’t provide World Space support at this time…
I could generate the element, and update it every frame to make it keep its relevant position beneath the GameObject, but this seems less efficient than working it into the renderer with a default position.
This problem could be solved easily enough with a simple GameObject, the issue is the text element. I tried using a standard Canvas for this, but there is something wrong with that approach in World Space, and the button I create won’t interact…
Instead, I have to either fix the World Space Canvas issue, build a GameObject with text on it, or update a UI Element every time the Camera moves (for each Element instance) to re-position the Element correctly…
I would prefer to not have to make a custom system to adjust these values, when this engine has TWO separate UI systems for solving something like this.
If your question is about official World Space support in UI Toolkit, then no, World Space is not a feature that we currently officially support. This is not on our 2023 roadmap . This is why our other UI system is recommended for world space.
There are examples online of World Space UI using UI Toolkit if you look them up, but they would not be a “native implementation”.
Yes. However, when I tried to do this it didn’t work. The UI objects are detected by the Event System, and are un-responsive. This is even with the active input system setting set to “Both”.
Unity is pushing towards UI Elements to take over for UI. Due to this I found it prudent to use UI Toolkit in my project. I really don’t feel like re-building my entire UI around the original system, when Unity could deprecate it at some point.
I was hoping for a simple solution to blend the two systems properly. But if this doesn’t exist, I will just have to build a custom system to display the elements in world space as is necessary.
Did you find a solution to this? We are using UI Toolkit to display our editor and have a render texture displaying our 3D scene. We have World Space canvases inside the Render Texture and like you can get the Event System to racyast the target UGUI Button but it doesn’t seem to be reacting to events (mouse over, mouse press etc). Any luck on your end?
IIRC, I meant that I first had problem with “other UI system” (not UI Toolkit), then rotated button and it became responsive. As I understand, you’re using UI Toolkit, so this is irrelevant.
No. I never found a solution for this. The only way forward was going to be creating a custom implementation. That means, manually creating the object in world space, and updating its position and orientation every time the Camera moved around.
No worries, thanks! Just wanted to let you know that I did find a simple solution that I posted in the thread . I’m just not sure if you had a different issue and I misunderstood your problem, but if not I hope it helps.