Download

How to access created widget class BP to add value to it text

Hello friends,

I have a UMG widget with a text “(X value) GOLD” that spawns when the player overlap a gold dropped object.
For example: the player overlap a gold, a text are created 5 GOLD flying to top and fading off.

That it’s ok and running fine. Before, every gold that I overlap, it spawns it UMG widget for each gold…

I’ve changed the logic to spawn just ONE widget at the first overlap, and for each overlap after the first, it will add value to the only one widget created. It’s that what I want.

The problem is:
I dont know how to access the variable text inside the UMG widget created from the Gold dropped BP.
So what is happening: The golds are dropped, the first overlaps creates UMG widget text with the value of the gold got, but the sequence of overlaps wont change the value of the created widget.
I’ve tried to cast widget class but I just cant change the value of Text variable inside it widget.

I’m attach the image to show it.

Thank you and sorry to my bad english. <3