[BUG?] Canvas Screen Space - Camera - Inventory System

I’m currently viewing the inventory course and as a bit of a challenge I decided to add in some 3D Synty assets to the inventory system. For some unknown reason once I switch render mode to screen space - camera (and setup the positioning etc so the UI camera displays correctly) it doesn’t appear whilst in play mode but correctly renders outside of it. As a work around I have found that I need to change ANY arbitrary setting on the UI Camera and suddenly hey presto shes a go-er. Can anyone think of a reason for this?

UNITY VERSION: 2021.2.11f1

I may need a bit more context to answer the question…

Are you referring to using a render texture to display an asset as the InventoryIcon?

Negative, I am directly inserting the 3D objects into the UI layer and rendering using Screen Space - Camera with a separate UI Camera. Attached is the camera setup and showing it working outside of playmode.

Hmmm… that’s probably not the ideal way to go about it. As a rule of thumb 3d objects don’t play well in UI space. A better method would be to have the Synty character in a location away from the rest of the scene with it’s own camera attached. Then you’re going to want to create a Render Texture. In your UI, you want a raw image, to which you’ll assign the render texture. That image should be in your UI. Finally, set your camera to render to the render texture.

Privacy & Terms