detect if mouse if over ui unity c# code example Example: unity Check if mouse clicked UI element EventSystem.current.IsPointerOverGameObject()