UI Widgets with a dynamic text

Hello,

I want to create a UI with a text in the scene. It should behave like a sprite and its text should be editable by an actor. I think I have to create an actor class and add a UWidgetComponent to it. But I have no idea of the next steps. Can you give me a piece of advice please? Thank you in advance.

Best,

Alexander Temnyakov

Would need a bit more info about your issue, but you’re on the right track. Let’s say you created a custom widget that includes a Text Block. You also created an actor with a Widget Component, and then set the widget class of the widget component to the widget you created. Then in your actor blueprint you can access the widget using Get User Widget on the widget component. After that, you can cast it to your custom Widget class that you created, and you should have access to its members. You could make a function in the widget blueprint with a Text input to set the text of the Text Block, and call that function in your actor, and set the text of your widget like that.