Detect UMG blocking on raycasts?

I am using LineTrace to detect mousing over actors in the world.

However I want to avoid doing this when the player is mousing over any UMG widgets.

Is there a way to do this?

use the “is hovered” node in the widget bp to check if your mouse is over the widget.