Is it possible to set a 3D object between Ui Elements?

Hey,

I want to put some 3D objects into my UI. Therefore I need some of the UI elements to be rendered behind the 3D objects and some of them to be rendered in front of them. Is there any way to achieve this in the UI system Unity provides?

Thanks torpedo

Unity’s UI Canvas has a couple of options, setting it to ‘World Space’ will let you place the container for UI objects in a 3D space. More info can be found here: Redirect to... title of new-page

YES! There is a way to do this. First of All you need to have world space UI. For displaying some elements of UI behind 3D objects and some in from of them, you need to have different canvases for them. Change Order in Layer of canvas to change rendering order. greater value will render the canvas on top of other objects.

No. It IS possible, but not natively with the UI system provided.

As mentioned in previous answers, you can have two canvases (UI systems), one in World Space behind, and another Screen Space one in front, while the 3D object would just act as a regular object.

The method I prefer, however, is having it all in the same canvas. You can achieve this by first off, adding the UI elements to the canvas. Then, add your mesh, or any kind of 3D object with a renderer as a child object of the canvas. After that, play around with the “Z” position values. It helps to untoggle the 2D view in the scene view. Sizes will sometimes be unexpected, as a the screen space canvas might be much bigger than the 3D object, so resize accordingly.