Bind non-UObject function to delegate

Hello,

seems like there is no way to bind function located in non-UObject class to a dynamic multicast delegate declared with DECLARE_DYNAMIC_MULTICAST_DELEGATE and its variations, or am i missing something here? I’m trying to bind function of Slate widget so i can update widget according to the changes in UObject based object.

Would be glad to hear any replies, thank you.

Yes, reflection system only supports classes in UObject, it won’t see functions and varables outside of it, so your function need to be in UObject or use UMG insted. It’s one of the reasons why UMG was made was to create Slate wrapper in UObject environment.

Actually, using non-dynamic delegate and CreateRaw function solves the problem, makes it impossible to use the delegate with Blueprint, though, but it perfectly suits my needs.

Regarding your answer, , i know that reflection system works only with structures wrapped in UE macroses, and you actually answered some different question, not mine. Thank you for your time, though.

1 Like