Right click inv item

Sounds very similar to [this issue][1]. The idea is to create the widget only once and then show / hide it; image from that thread:

  • the items can be added straight away
  • no need to rejiggle / rebuild widget geometry (which can be very slow with large amount of complex children and prone to text layout issues, below)
  • it can be updated and force ticked (Force Layout Prepass) when the player cannot see it - helps with text layout
  • it’s much more efficient and easier to show / hide an element rather than remove / add in viewport

Regarding the last bullet point, eventually you may want to create a layered inventory with canvases that can manipulate Z order within their own layer. But this may be irrelevant here, depends on the scope.


Start small, don’t worry about pretty icons, work with placeholders.

Look into how [interfaces][3] work - these are crucial when it comes to simplifying communication and interactions between world objects and their representation in inventories. And Event Dispatchers work great for actor <-> owned widget data exchange.

Here’s a primer on interfaces I posted a couple of weeks ago (the long non-green answer):

The project is attached somewhere at the bottom. It’s not about an inventory per se, but that’s like a building block of a system. Not a tutorial but more of a demo of an approach.