After moving to the system where Unity UI blocks from clickthrough without the necessity for custom assigned rect transform I ran into a bug, where if I Click to drag an inventory item and release over unity UI that is a raycast blocker, the drag state sets to none, but the item still continues to drag. I narrowed down the issue to this line in PlayerInteraction.cs:
Code comment seems to be a bit vague, so I was wondering what UI issue does this code work around? Maybe that scenario is impossible in my project and I can safely remove that part?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I don't recall exactly, but it was a means of fixing a previous bug. I shall attempt a recreation.
Recreated. If the mouse click is released, and you're using drag-and-drop inventory it's best to clear the inventory regardless of UI state.
Try replacing lines 205 with:
Thanks, I'll report if this has any knock-on effects.