Is There A Way to Keep Menu Widget On Top Of Everything At All Time?

Hi I’m encountering this issue with my game’s menu being blocked by some other triggered widgets on top of it, for example, I pause the game and if some enemies attack the player, the blood FX widget will block the access to the menu’s button pressing.
Is there a way to keep my widget on top of all widgets all the time? I already used set focus on the menu but that doesn’t seem to do it.
Many thanks!!

Did you try ZOrdering?

image

1 Like

Oh ok I’ll give it a try tonight, didn’t know about this thanks for mentioning~

1 Like

To expand on this.

  • you can have a master widget with a canvas and add widgets there instead of the viewport. A canvas slot allows you to manipulate the zOrder
  • or, when you add the top-layer menu to the viewport, do so with a high zOrder:

image

If your top layer menu has zOrder 10, any other widget that has a lower one will appear underneath.


Things can get more complicated when you’re working with screen space widget components.

3 Likes

Tested, works pretty well now. Thanks a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.