Dropdown interrupts OnPointerEvent
Hello,
I have a menu which is sliding in when hovering over a snippet of it. And vice versa when leaving the menus area with the mouse. All of this by using the functions OnPointerEnter & Exit. The script is attached to the root menus GO. This part works fine so far.
On runtime dropdowns are added to the menus GO. But when I slide in menu, as soon as I open up a dropdown the OnPointer event triggers the exit state. Which, of course, closes the menu and the opened dropdown is outside of the screen..
Other GOs like a button or inpufield do do not trigger the exit state.
I tried an extra event trigger on the dropdown with enter and exit. Both of them pause and unpause the menu hover code. This also didn't work, as this off and on function fires immediately right after another..
I'm running Unity 2021.2.8f1 and tested both legacy and TextMesh Pro dropdown.
What am I missing?
*EDIT
After messing around a bit I found that the blocker, which is generated when pressing the dropdown, is not part of the menu ans causing all of this. I might come to a custom solutions for this, but is there any build in solution for that?
Answer by mrwasd · Feb 03 at 04:34 PM
I ended up writing my own PointerEvent simply by checking the menu position and mouse position.
Your answer
Follow this Question
Related Questions
Disable a single Dropdown option. 2 Answers
How to add bulk items in dropdown 0 Answers
Dropdown options to text 1 Answer
Re-order the items of dropdown list using DragHandler 0 Answers
Reuseable Dropdown 0 Answers