Can delegate definitions be defined in their own separate header file?

You don’t need the UCLASS(), there is a UDELEGATE() macro for this case specifically. Remember to add the #include "<FileName>.generated.h" to the includes above.

Take a look at “Engine/Source/Runtime/UMG/Public/Animation/WidgetAnimationEvents.h” from the engine sources as an example (https://github.com/EpicGames/UnrealEngine/blob/16dc333db3d6439c7f2886cf89db8907846c0e8a/Engine/Source/Runtime/UMG/Public/Animation/WidgetAnimationEvents.h#L9 on github)

2 Likes