Unreal Engine Inventory Slot İndex

I’m adding inventory slots in Unreal Engine, but I want to delete the 4th index. How can I do that?

Use the Remove Index node
image

1 Like

If they’re widgets:

image

I have 2 objects, and I want to delete the second one, but I need to find its index first. How can I determine its index and delete it?

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.




I want to find the index of the apple and remove it.