I have a fully working drag-and-drop inventory system that uses a Screen Space Overlay UI canvas, and I want to add 3D objects as inventory icons. The correct way to do this, seemingly, is to switch the canvas to Screen Space Camera, and assign it my orthographic UI camera which I already have for rendering 3D UI features.
The issue I have is that when I switch to SS-Camera, the mouse doesn't interact with UI elements properly anymore - dragged elements disappear, seemingly getting dragged very far off screen. After dragging one UI element, it becomes impossible to interact with anything else on the UI. I tried fixing this by checking for SS-Camera and using *WorldToScreenPoint*, as per another forum post, but that hasn't fixed things.
What do I need to be changing when moving to Screen Space Camera?
(Unity 2021.1.0b1, latest URP)
↧
What needs to be considered when moving from a Screen Space Overlay UI to a Screen Space Camera UI?
↧