I have developed a ui where a user clicks on a 3d object, and gets a popup uGUI selection to make a choice. The choice is critical to determine what type of action the user wants to do. I have this working, and it works well IF the user makes a choice. My issue is that the user COULD choose to click somewhere else, not on any of the available choices. Since the popup is just a small panel displayed over the 3d Object, I have no way to stop them from clicking anywhere else on the screen, nor am i sure I would want to.
In the end, if a user clicks elsewhere, I need to undo the primary action. How can I write something that basically says “If a user clicks anywhere else on the screen but on this panel then…”?