How can one use Delegate Functions within a UBlueprintFunctionLibrary?
I'm getting to grips with the Blueprint Function Library system, and I'm trying to allow for developers to bind Blueprint functions to events on the Blueprint Function Library I've created. I've seen this functionality supported in places throughout the engine such as the Functional Testing Manager, however I haven't quite worked out how to execute the events that I've defined.
For example, within the below code, I've created an 'ExampleAssignable' BlueprintAssignable property.
How can I trigger the ExampleAssignable event? Aside from calling ExampleAssignable.Broadcast() within a non-static member function, which I'm in turn also puzzled as to how I could call if it's not static, is there another valid way to do it? Is it possible perhaps to find a pointer to the Blueprint Function Library and access the property from within an external object?
Would love to hear any suggestions regarding best practices for this particular use case. Thanks!
asked Jan 18 '16 at 11:33 AM in C++ Programming
Chris at Opaque
Not sure what code you're referring to with the Functional Testing Manager, but this isn't possible with blueprint function libraries, since they cannot hold state. They are composed purely of static functions, so like you say there would be no way to access a non-static member. Likewise, the reflection system doesn't support static data member properties.
If you need state, you would have to derive from
Follow this question
Once you sign in you will be able to subscribe for any updates here