Unreal Engine Inventory Slot İndex

Maybe you do not need an index, if you have an object reference already:

image

If the said object is a widget (you never explained what we’re working with - perhaps they are objects, indeed), these can pop themselves out by Self Removing from a panel.


Array elements do not know where they are in the array unless you tell them. You could use a map container to associate objects with an ID of choice, or use tags, or include an ID in the object. You’d then need to iterate the array and compare IDs. It’s ok if you have 40, not OK if you have 4000.

Finally, you could compare instances directly - not sure if that makes sense but that would also give you an index:

Just do not remove more than 1 at a time here, use Reverse Loop instead.