Blueprint Delegates and Event Calls
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.
asked Apr 03 '15 at 12:36 AM in C++ Programming
When you add the event call for event listener, it created based on the default value of object, which it's null at that time, and at BeginPlay you assign another object which not same as old one so when you call it only execute whatever bind after that, what you experience is 2 event of 2 different object, Component work because they added in constructor.
answered Apr 03 '15 at 03:17 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here