So when I click on a hud element it also clicks through that into the game world, in this case, selects a tile in a grid I have.
Is there a way to distinguish between hud and gameworld?
I have this working but it seems very inefficient
Thanks
I would make a custom user widget who monitors mouse enter/mouse leave and notifies some system when he’s been activated, then just have a manager widget or system that spawns them as children and maintains their lifetime. I’m assuming these things are dynamic and need to come and go anyway.
The way you distinguish is, if nothing in the UI gets the event, it eventually bubbles up to the viewport where it’s passed to the game layer (player input) to be dealt with in the classic sense.