Can you access widgets through an actor blueprint class?

Hey, is it possible to access widgets through an actor blueprint class? I’m asking because whenever i try to either call remove all widgets or create new widgets/add them to the viewport nothing happens, im thinking it could just be a problem with the widget because even if i add it to the beginplay event in my player character it doesnt appear.

Yes, you can access widgets through an actor blueprint class. Widgets are owned by blueprints.

If you’re creating a VictoryWidget and adding it to the screen on begin play (for testing purposes), that should work.

It’s probably something to do with your widget. Just in case, could you share an image of the creation code you’re using? Of course, also share any visibility-related items in your widget including bindings and nodes

This may also be an issue unrelated to your immediate widget- you can test this by adding a node after your widget creation and toggling a breakpoint on that node.


This will cause the game to stop the moment you add a widget to the screen- if it’s on-screen when you do this, it’s likely getting removed somewhere.

1 Like

I just tried the breakpoint and the widget is onscreen on that frame, then i checked if i have any remove widget functions that might effect it, and realized i remove all widgets every tick to place a different widget, don’t know how i missed that… But thank you!

1 Like