FGameplayEffectContextHandle UGameplayAbility::GetEffectContext(const FGameplayAbilityActorInfo *ActorInfo) const { check(ActorInfo); FGameplayEffectContextHandle Context = FGameplayEffectContextHandle(UAbilitySystemGlobals::Get().AllocGameplayEffectContext()); // By default use the owner and avatar as the instigator and causer Context.AddInstigator(ActorInfo->OwnerActor.Get(), ActorInfo->AvatarActor.Get()); return Context; }