Widget Component - Get parent actor?

We somehow jumped from sending data to a widget to designing an entire system. I can’t justify that kind of time investment. But here’s a snippet based on what I was suggesting in my original post:

The player has a sphere collision, when it interacts with something, it tell it to show its widget:

The Loot object:

It calculates the distance to the player, and pushes the data into the widget.

Image from Gyazo


There are many, many ways of achieving the final results. You could keep a list of object in the player and interact with that instead. Not a bad solution, more complex initial setup but probably more performant.

The above super simplistic, of course. If you want to communicate with multiple unrelated classes, do look into [Interfaces][3] rather than casting. Ideally, in addition to, actually.

Otherwise i just remember that i tried
to set the text in your example and it
didn’t work because i couldn’t plug
from the blue set node to a place that
made sense.

Judging by what was discussed above, may I suggest you also look into blueprint communication: Direct, Event Dispatchers and the aforementioned Interfaces. It’s pretty much impossible to achieve any data flow without knowing how these work. And it’s a wee bit beyond the scope of Answer Hub.

Hope it helps a little bit at least.