How to expose properties of a component in a Widget made by composition?

I wonder if it is possible to expose a property of a component in a Widget made by composition.

The case is as follows:
I have made a UserWidget containing a UTextBlock in C++.

3

And I can modify the text from the editor without problem.

The problem is when I want to use this UserWidget as a component in another UserWidget.

I can’t modify the text in the Editor.

I tried to bind a variable dynamically to the text property but this doesn’t work while editing.

4

Is there a way to expose the property in this case in the editor?

Thank you so much!!

In your UserWidget that adds the TextBlock, add a Text variable and make it “Expose on Spawn”.
In event Pre Construct, set the text of the TextBlock using variable value.

2 Likes

Thank you so much!!