Input priority

I am trying to devise a way to prioritize input.
So clicking on the terrain walks the player there
but click and dragging moves the camera
and clicking on another object launches an action on this object
unless the click and drag is done on a GUI element in which case the gui element eats up the input

Has anyone cracked that?

Do I need to roll in my own Input even manager ? And if so what is the best approach ? Passing delegates as parameter for a Input Registrar which at LateUpdate determines which one is the winner or a set of carefully crafted lock booleans ?

Thanks

I came up with InputX,
usage:
InputX.instance.Register (delegate, inputType)
So before fireing up the delegate it finds out which one has the type of highest priority,
It works for most cases except for two gui buttons and I do not know why.
See when clicking the big button, “Dashboard” should display in the console since it’s the first item in the ClickType enum but “Other GUI” displays instead ??
So there is this problem and also how do I deal with drag event ?

Any light on this subject is much appreciated !

447839–15567–$test INPUT.zip (135 KB)