Need Help Putting 3D Object in Front of UI Toolkit Document

Hey Everyone,

I’m stuck on something in my Unity project and could really use your help. Here’s what’s going on:

I made a menu that fills up the whole screen using UI Toolkit (UIBuilder). Now, I want to show a 3D object in front of this menu. It’s like a character picture that can move around.

Before, I could easily put 3D stuff in front of menus using UGUI. But with UI Toolkit, the menu always shows in front of everything else, even my 3D thing.

I’ve looked around and tried different things, but I can’t figure it out. How can I make the menu show behind only my 3D object?

Also, I got some software from the website who provided free software download. It’s been helpful, but I’m having trouble making it work with UI Toolkit.

If anyone knows how to fix this or has any ideas, I’d really appreciate your help! Let’s work together to find a solution to this problem.

Thanks a lot for your help!

I believe the more straight-forward solution is via render textures, using one as the background for a visual element. That’s how I’ve always done previews of game objects within UI Toolkit.

2 Likes

UI Toolkit is always drawn on top - at least for the time being. It’s a known limitation that I believe is mentioned in the manual somewhere together with possible workarounds - said render texture for instance.

World-space UI Toolkit will come later, which will allow similar workflows as UGUI. In the meantime, you’ll need to render the 3D object in a RenderTexture as others have mentioned (or render the UI Toolkit in a RenderTexture to put it in world-space).

1 Like