Hi, I need to design a helper system where I can drag a helper lens around and drop it onto random elements to view helper info, if any. The helper lens is on top of all other elements, and I have implemented dropping logic using the Overlap function. However, when I have multiple UIs that sit on top of each other, I don’t know how to identify which element is at the topmost position at the drop location.
For example, my first layer is the gameplay UI, and I might have a second layer, the inventory UI, which can take up half of the screen and sit on top of the first layer (the gameplay UI is still visible and interactable). I can drag my lens into the inventory, but it may still overlap with buttons from the gameplay layer behind the inventory.
How do I make the lens skip the elements from the gameplay layer and only detect those from the inventory layer? Thanks!