The text on the widget blueprint does not update…

UE4.27
Device: Oculus Quest2/Meta Quest2

Made a WBP like this

And then, the WBP is projected by Widget Component on the actor BP that is pawned.
image

In this situation,
in the Event Graph of the WBP, I created a custom event to change the text.

In the WBP, for example, if I call the custom event to change the text with OnPressed

the text is changed,

But when I call this function in my HUD

the text is not changed, not updated…

I have checked to see if the custom event is called with PrintString.

It seems that the custom event itself is being called.
image

So why are these characters not changing…?
Can someone please help me…?

To me it looks like your reference for WBP Quiz Box in your HUD is calling something other than the widget you are attempting to modify. Where are you setting WBP Quiz Box? Is it possible that you have multiple of these widgets existing in the world and you are referencing the incorrect one?

2 Likes

thanks!
There is only one WBP Quiz Box. I think it is not being referenced incorrectly.
image

Widget Component and WBP are set in BeginPlay of HUD as shown below.

Is there anything else you can think of as a possible solution???

You are using a 3d widget component, yes? If that is the case then creating the widget on the end of your last image there is not actually the reference you want. You would want to use the quiz box variable you set initially as that is the actual 3d widget components widget reference. You do not need to create the widget on the end of your last image.

2 Likes

I am using this widget component
image

If I do so, can I call a custom event named textChange in WBP?

What are the possible solutions?
I am sorry that there are so many things I do not understand…

That widget component is exactly what you need. Drag that into your graph. Off of that you can get the widget object(I am not at my pc and cannot remember the exact name so bare with me). You should be able to cast to your widget class after and then run the event from there. Hopefully that makes sense with my mobile capability. If not, try searching “get widget from 3d widget component” and that should lead you to similar things as ive said here.

2 Likes

It’s done! Fantastic!!! I’m so impressed!
Thank you so so so much!!!

2 Likes