So we want to make heavy use of UIToolkit to render various things in Worldspace (there are reasons this can’t be just Screenspace).
The solution right now is to have a single UIDocument with its own Panel Setting for each worldspace object (similar to a Canvas in UGUI). Those Panels render to a Render Texture each which is then put as the sharedMaterial texture on a plane primitive.
The questions are:
Does this scale at all? (Maybe not? Probably depends on the render texture resolution. Seems to be using quite a bit of memory if you have hundreds of objects)
Is it horrible Jank to use a ton of Render Textures this way? (Probably yes)
Is this different from what UGUI is doing under the hood (probably no view frustrum culling which is bad in and off itself)?
and last but not least Is there a better way to do this with UIToolkit for non-static UI (for static UI you could just render it once (though I’m also not a hundred percent sure how to force this), copy it to a normal texture and use that then)?
I really don’t want to have to use UGUI for this as I think UIToolkit is just overall a much better and saner system. (Tests seem to show that UGUI doesn’t use any additional memory for additional world space canvases however :/)