get ui component that mouse is over unity code example Example: unity Check if mouse clicked UI element EventSystem.current.IsPointerOverGameObject()