problem with eventSystems

Hi, I would like that when I touch the menu button, the game doest start (cause I use input.getmousebottonDown and when the player touch everywhere on the screen the game start) But I want that if the player taps on the menu button it doesn’t start .

I tried eventSystems but for touch doest work.

if (EventSystem.current.IsPointerOverGameObject() && EventSystem.current.currentSelectedGameObject != null && EventSystem.current.currentSelectedGameObject.CompareTag("MenuInzio"))
                {
//stuff
}

Have you any idea?

To many checks. You should only check if pointer is over game object and ignore all clicks if it returns true because they will be handled by the event system. After that set raycast target to false for all images on canvas except that options button

Thank you, but how to I set raycast target false ?

Unchek it in the Inspector tab.