I move a player object around by ray casting into the world. But if the player clicks on a UI element such as a button I need to know that in my movement script so it ignores the world click.
However I cannot find a way to detect if the mouse or user last touch was over a button.
There are some other questions similar to this one but I cannot get the answers to work.
I think my problem is using revision 20 of the system as I can’t find its version of :
// <= 4.6b18
if (!EventSystemManager.currentSystem.IsPointerOverEventSystemObject() )
// >= 4.6b19
if (!EventSystem.current.IsPointerOverGameObject() )