3D model in UI?

Hi is it possible to have 3d models as part of the UI eg. custom 3d buttons (cube, sphere, etc…) for UI instead of 2D?

Not part of the canvas, no.

However, you can use multiple cameras and render to a texture to potentially get somewhere close to the effect you want.

Also, you can have 3D elements that are not part of the UI canvas act as buttons and controls. You could parent them to the camera as well.

Yes you can, Im doing it currently

Add a SCREEN component and disable the “screen space” so it’s rendered on the 3D space. Place it on front of the main camera, or inside of the camera so it’s visible regardless of where the camera has moved.

Load the 3D model inside of the screen component - you’ll have to scale up x100 since the screen component uses a different scale. Remove “world” layer from the entity and set it to “UI”. Also make sure the camera has the “UI” layer on it.

Now you can make the 3D element interactive doing raycasts, OR what I do, place a transparent button on top of it and use it for the trigger, and play the 3D animation (eg, moving the button) if you have these

1 Like