Cannot Interact With UI

This has been stumping me for a while and I have looked in various forums to find the solution I’m hoping someone can help me. In this scenario I press B to open up a buy menu, in theory, I should be able to click on one of the buttons numbered 1 thru 6 in one widget to interact with them. But I can only interact with the Buy menu itself, which is a separate widget. What am I missing how do I can get the player to interact with both widgets?

Here is the Buy Menu Button (showing highlight when hovering over)
Screenshot_17
Screenshot_18

When the Buy menu is not active (Able to hover over button and interact)
Screenshot_22
Screenshot_23
Screenshot_24

Below is some of the code



Screenshot_21

Run this:

It’s a UI debug tool - click on Pick Hit-Testable Widgets inside.

Things may look a tad strange from now on. Run the project, show the menus and mouse over stuff. What do you hit when you mouse over the button while the buy menu is up:

My bet is that the buy menu is simply on top and blocks the interaction. It’s either full screen or has an element that consumes clicks. Can we see the hierarchy of the menu?


Alternatively - a quick fix could be as easy as giving the Buy menu lower zOrder than the clickable 1-6 menu.

zOrder defaults to 0, so the most recent widget added to viewport ends up on top. If you set this value to 1 for the 1-6 menu, it may just work fine as is.

Yes that helped to get the buttons to work but not actually achieve what io want which is to be able to interact with both UI at the same time., I worked around this by importing the Buy Menu Ui into the Main ui for the player and then displaying it when called. This way i can interact with both. May be a cheap work around but it works thanks for the input either way helped me understand that there is layers to the UI

There is a way to click through widgets to reach layers underneath. Look into how onMouseDown and Previews work. If you’re working with native buttons, it may get difficult tobachieve all desired behaviours, though.

The zOrder suggestion worked for me. Thanks friend! Many years later! :metal::laughing: