Communicate from UMG Button to Blueprint Actor

Don’t use *GetAllActorsOfClass *node for something like this - it’s meant for something else and this just leads to bad practices. What if you have 3 actors - how would you know which of the 3 the node fetches is the one you want… ? It does not even guarantee element order :expressionless:

How actors communicate will depend on what you expect to happen and how you set things up. Actors in the level blueprint vs actors spawned run-time, for example. One widget per actor, or one widget for many actors, many widgets that manipulate 1 actor, perhaps? Are you going to work with inheritance a lot? Do you need *unrelated *classes to talk to one another?

Just posted this, see if it answers your question:

https://answers.unrealengine.com/que…ed-distan.html

This is a self-contained method but dispatchers can be hooked up to anything. More here.

Edit: check here, too