Exception on delegate binding

Hello,

In MyActor in constructor I’m calling

OnTakeAnyDamage.AddDynamic(this, &MyActor ::OnDamage);

OnTakeAnyDamage is a signature, declared in AActor.
OnDamage I declare like this:

UFUNCTION()
void OnDamage(float Damage, const class UDamageType* DamageType, class AController* InstigatedBy, class AActor* DamageCauser);

You can see, that this function is UFUNCTION.

Next, SOMETIMES when I start a game I receive the error

“Unable to bind delegate to ‘%s’
(function might not be marked as a
UFUNCTION)”

What is it? How to fight?

Hi nikitablack,

Are you still experiencing this issue?

I think I found some workaround for this (don’t remember exactly).