Hi all,
When we are using a function to overlap we have code line like :
MeshComp->OnComponentBeginOverlap.AddDynamic(this, &AWeapon::AnyNamedStuff)
AWeapon::AnyNamedStufffunction can be named anything and its working.
Then for that purpose, I have created DECLARE_DYNAMIC_MULTICAST_DELEGATE in my component to handle damage.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_SixParams(FOnHealthChangedSignature, UHealthComponent*, HealthComp, float, Health, float, HealthDelta, const class UDamageType*, DamageType, class AController*, InstigatedBy, AActor*, DamageCauser)
FOnHealthChangedSignature OnHealthChanged
When I add healthcomponent to my class I need to bind exactly with the same function name in my class. I wonder WHY ?
HealthComponent->OnHealthChanged.AddDynamic(this, &ASCharacter::OnHealthChanged);
If I change to
HealthComponent->OnHealthChanged.AddDynamic(this, &ASCharacter::AnyName);
Its not working