I have a C++ event system running in the background. You bind events to the system based on a type. When events are called they are called by the type so only listeners of that type get called.
Now I’ve created a dummy class. To help with assignment in blueprints.
When in a blueprint you bind to events by calling “Bind Event” as seen in the image.
It returns a dummy class inheriting UObject that binds itself to the event system based on the type you pass in.
The returned object has a DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam that is BlueprintAssignable and you assign it the blueprint. This allows you to handle each call back in a unique way.
So far so good.
As seen in the image, binding an event to the OnEventCalled works just fine.
However, if I store the reference to the object in a variable and try to access the event OnEventCalled (Event Listener) separately. It does not work.
However this works on other things like components, lights and actors. Is this simply impossible or am I doing something wrong.