Changing the z order not changing the widgets

Hi, I have a button event configured on a player controller to create a widget and render it on the players screen. This works fine. I have a function within that widget’s blueprint that is called on any mouse click and sets the z order to 1 + the current highest z order of any widget (recorded as an int under the player controller). However even though the zorder changes on a widget, it does not then get rendered over another widget.

It seems as if setting the zorder when creating the widget on the UI (using the z order input pin) works, but any changes after its initially rendered aren’t reflected.

Is there another method I should be using to get widgets to render over each other during runtime?

Nope. All you can do is either toggle the visiblity from collapsed to visbile or destroy and create or remove from parnet and add to viewport.

A nice macro library function would be great for this or a function in your PC or Char class just make a function input a widget, and then remove from parent, call it whenever you need a respawn

Else you have to change the values on a tick in your widget class.

Hope this helps
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.