Is it possible to dynamically create an in-world widget after game start?

I am looking to create a in-world progress bar on a door in my game that only shows after a certain point. As a result, I don’t want the widget component present at begin play but would rather add it in when that point is reached. I am able to create a widget component when needed, however, it seems like it is not possible to set the widget class of this component through blueprints (which I think it needed to display it in-world). It would work asynchronously load and spawn an actor that already has the desired widget class as a component but that seems like adding unnecessary steps.

You’d need to:

Ensure the Targetpin on the Add Widget Component node gets an actor reference - presumably the door.


Alternatively:

  • create some custom widget component classes (as many types as needed):

  • assign desired widget classes to each component:

  • you can then:

And pipe in the widget component class as needed. This method allows you to configure each widget component class upfront.