I am having a problem with my in game UI menus like the pause menu.
When I hit the escape key the mouse cursor and pause UI is shown with 2 buttons "Continue" and "Exit". I have locked the player from moving when this UI is shown. But when I click outside of the buttons the mouse disappears and the player can move once again, the UI is still shown but it's lost focus or something.
Is there a simple way to stop this? I've seen some scripts which seem to try to catch this behavior and ignore the click but I'm hoping there is a property on the canvas or something that I can use built into the engine.