How to detect a successful Drag-Drop operation on the drag side.

I’m trying to create a system where equipping an item from the inventory reduces the stock of inventory left.
Equipment is added by dragging it from your inventory and dropping it onto the target.
Since I don’t want the drop side to need to have a reference to the inventory, I want the drag object to send an event directly to the inventory indicating whether the drop was successful.
Is there any way to do this?

I would use interfaces, they’re the perfect solution for sending signals like this.

I know interface is a good solution to send a signals.
But I’m having trouble detecting if the drop was successful on the drag side before sending signals.
OnDrop detect signals on Drop side.

i don’t really have enough data to help u more than to suggest interfaces. I imagine you’re using some ui elements, you should be able to detect which ui element the mouse is above when the mouse key is released and use that to know if it was successful or not. If ur not using ui widgets, you could also try doing a trace from the cursor to see what you’re above.

1 Like

Tracing from the cursor is a good idea!
I didn’t think of that. I’ll try that soon.
Thank you for your help.