how to use 3d objects for inventory slots
i would like an inventory just like this one shown in the photo using 3D objects in the UI. but i don't know if i would have to make it from scratch or if i could just use an inventory system on the asset store? very new to this and would prefer the most noob friendly way as i'm sure there are many ways to get the same end result.
Answer by Hellium · May 15, 2019 at 02:04 PM
If you want to reproduce this kind of inventory, I believe a World Space Canvas is the way to go, and set the position of the 3D objects in front of each slots.
Otherwise, you could render 3D models on a Render Texture and display it on a screen space canvas, but the result will be clearly different (I added this information to indicate another way to render 3D objects on UI, but it's not how the inventory you have provided works)
Answer by kasuyakema · Dec 05, 2020 at 04:25 PM
So if someone else ends up here: I had good sucess with Camera stacking. A second camera is set to overlay and ortographic. It renders only Objects on the "Overlay" layer (Or whatever you want to call it). The main camera does not render Objects on "Overlay". The second camera is then added to the camera stack of the main camera.
A canvas set to camera space uses this camera to draw to. Then you can parent Gameobjects to gui elements on this canvas, and set their layer to "Overlay" so they appear only in the menu.
Its handy because you can set the new camera to not use postprocessing effects and other stuff.
Your answer
Follow this Question
Related Questions
How Can I make items inventory? (HELP) 0 Answers
Adding a prefab to the Item class instance 0 Answers
IPointerEnterHandler and IPointerExitHandler not working 1 Answer
Argument out of range? 2 Answers
How to make a Inventory Hotbar 0 Answers