OnGameplayEffectAppliedDelegateToSelf
example:
public:
void AbilityActorInfoSet();
protected:
void EffectApplied(UAbilitySystemComponent* AbilitySystemComponent, const FGameplayEffectSpec& EffectSpec, FActiveGameplayEffectHandle ActiveEffectHandle);
void UAuraAbilitySystemComponent::AbilityActorInfoSet()
{
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this,&UAuraAbilitySystemComponent::EffectApplied);
}
void UAuraAbilitySystemComponent::EffectApplied(UAbilitySystemComponent* AbilitySystemComponent,
const FGameplayEffectSpec& EffectSpec, FActiveGameplayEffectHandle ActiveEffectHandle)
{
FGameplayTagContainer TagController;
EffectSpec.GetAllAssetTags(TagController);
for (const FGameplayTag Tag : TagController)
{
//TODO: Broadcast the tag to the Widget Controller
const FString Msg = FString::Printf(TEXT("Ability Loaded: %s"), *Tag.ToString());
GEngine->AddOnScreenDebugMessage(-1,8.F,FColor::Red,Msg);
}
}