Download

Accessing non-character actor from Widget blueprint for event driven UI

So I am new to Unreal Engine 4 and was reading this in the documentation:

And basically I like the event driven UI system. My only problem is that in the tutorial (and pretty much every example online) only covers how to do this with the Get Player Character node. What if I want to receive events from a non-global, non-character object in my game? How would I access that in the widget blueprint? So say I have a BP which is derived from a C++ class and I have declared a delegate which I want my widget blueprint to bind to. The problem is, I have no way to access this BP in my widget blueprint. How could I solve this? Thanks!

The nodes Get All Actors of Class, Get All Actors with Interface, and Get All Actors with Tag can be used to get an array of actors, which you can then loop through and/or filter as necessary. They shouldn’t be called on every tick, but for one-time binding/unbinding of events, it should be ok.