How to have bp reference variable for current shown widget?

Hi,
I have several user interface widgets : Playing widget, Pause widget, Game Over widget, Game winning widget.
I would like to build a bp function that removes the current shown widget using “Remove from parent” node, and shows a desired one using “Add to Viewport” node.

The problem I face is that I don’t find a bp variable type that can store a general (base class) widget component reference type - but only reference to specific widget.

You should use UserWidget as a variable class:

image

image

My Products

1 Like

Works. Thank you very much!