- Home /
Click event on GameObject to open GUI also fires a click event on the GUI
I have a GameObject with an OnMouseDown method that enables the CanvasGroup of a transparent panel with 5 icons. The panel has a click EventTrigger that closes the panel when clicked outside the 5 icons. My problem is that when I click the gameobject and the panel becomes interactable, it closes on the same frame, getting the click event on the graphic raycaster too.
Is there any workaround to avoid the panel to read that same click event?
Your answer
Follow this Question
Related Questions
Custom UI element click/touch area 0 Answers
Make element recieve camera raycast, but not block it 0 Answers
Display issues with GUI only showing details for last object in list. 2 Answers
Different between IPointerClickHandler.OnPointerClick and MonoBehaviour.OnMouseDown 1 Answer
What does direction do for a physics.raycast besides direction? (read details) 1 Answer