UI Toolkit World Space?

I’m loving the UI Builder and USS system!

I’m hoping that it’s possible to render a UI in world space. There seems to be a ‘target texture’
RenderTexture for that exact purpose but whenever I attach a render texture to my Panel Renderer I get the following error:

NullReferenceException
UnityEditor.SceneView.OnGUI () (at :0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)

etc…

Does anyone know of a workaround?

I’m unable to reproduce this issue using the “CPH2019RuntimeDemo” project. Do you have a simple example that reproduces the issue?

Do you have any update on this? This is exactly the problem I am dealing with.

No update, never reproduced this issue. Feel free to file a new bug (Help > Report a Bug…) on a project that reproduces the issue.

Depending on your implementation needs (supposing you don’t need world lighting/shading) you can just have an overlay UI and modify the coordinates of your overlay.

For example, if you need a health bar displayed above a character, you would translate the 3d coordinates of the transform into 2d space to get the screen position as seen by the camera, and get the appearance of world space

I did also find this gist in case you need something more complex, it appears to create a world space interactive ui using UI Toolkit, but I haven’t tested it myself: