Is there a OnUiElementLostFocus or when clicked anywhere except this button/toggle method?

I have a popup element that slides out when clicking on a button. I would like it to slide back in when I click anywhere else.

I know i can create a fullscreen button without an image to solve this, but just to be sure that I’m not missing anything, is there a simpler option?

Input.GetMouseUp? Old fashioned, but still valid.

there is public void OnSelect(BaseEventData eventData) and public void OnDeselect(BaseEventData eventData) that get called from the event system.

when you click missions (as in you image) you’d get a OnSelect for that object. and when you click anywhere else you’d get a OnDeselect

1 Like

Thank you, that’s exactly what I was looking for!