How do I get my 3D prefab to show in a canvas panel.

Hello,

I’m making a game where the player generates workers over time while they are not playing. I want to display how many workers they generated when they return to the game.

I wanted to do this by having a panel show up when they return to the game with the model of the worker and the number of them that the game generated. I have the panel with a prefab of my worker attached to it and it shows in the scene window but it doesn’t show when I start the game.

does anyone know why this might be happening?

Thank you.

My best guess is that it’s because you are trying to render a non-canvas element using an overlay canvas.

Canvases can only render UI elements that are designed to render using a CanvasRenderer, and cannot render other types of renderers, such as SpriteRenderer and MeshRenderer. If you want to render those other types of renderers, you need a camera to see them directly; they will not appear without a camera even if they are a child of an overlay canvas.