- Home /
Not able to interact with GUI pop up menu
I have a button that when the user clicks on it pops up a GUI menu, when this pops up the game is paused. When this menu pops up unity thinks that the mouse cursor is still over the button. If the user goes to interact with the menu by clicking on it, unity responds to this click as if the user has clicked on the button again.
I have tried disabling the collider on the button and changing the layer to ignore raycast. Neither of these has worked. I even tried to change the mouse position but that doesn't work because input.MousePosition is read only. I put a debug.log statement in the OnMouseOver() function which is how I know unity thinks im hovering over the button instead of interacting with the GUI menu.
Any ideas on how to fix this?
Update: while in play mode if I click on the button and the menu pops up and then I click completely out of unity and then back into unity the menu works fine. Any ideas of what could cause this?
Answer by JusticeAShearing · Jul 04, 2014 at 04:39 PM
Well, it may be something to do with the pausing feature, which is currently beyond me, but here's a tutorial which covers an inventory GUI, which hasn't the problem. The little slots that you get at the end are able to be clicked on, and it doesn't pause the game.
https://www.youtube.com/watch?v=NsZ_XBCPR2s&list=PLB4DA4F8BDC3B82EE∈dex=32
Thanks for the comment, but this tutorial didn't really help.
When I'm creating my menu for leaving the game I will know more about it, so I'll try to get back to you then.
Your answer
![](https://koobas.hobune.stream/wayback/20220613153122im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Overlapping GUI Button priority 3 Answers
Text pop up when mouse over gui button 2 Answers
GUI.Label positioning for many device resolutions 1 Answer
Resolutions 1 Answer
How to get Rect from scene Button ? 1 Answer