Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

How to close a UI panel when clicking outside

$
0
0
Hello,

I want to have a UI panel that closes whenever the player clicks outside of it. So far, I have tried to take advantage of the EventSystem and created an EventTrigger that fires up on Deselect and also added the Selectable component to the panel. Whenever the deselect function get's triggered I simply close the panel. This works but as a side effect the panel also get's closed whenever I click an element inside of it, like a button for example. This happens most probably because the...

How to close a UI panel when clicking outside

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>