Get the original instigator after an effect creates an ability on a target

Did a bit of digging through the code and it seems what I need just isn’t exposed to Blueprint. Here’s the code to put in your <overridden>GameplayAbility.h:

	UFUNCTION(BlueprintPure, Category=Ability, DisplayName="Get Current Ability Spec")
	FGameplayAbilitySpec BP_GetCurrentAbilitySpec() const
	{
		return *GetCurrentAbilitySpec();
	}
	
	UFUNCTION(BlueprintPure, Category=Ability)
	static int GetAbilityLevelFromSpec(const FGameplayAbilitySpec& Spec)
	{
		return Spec.Level;
	}

	UFUNCTION(BlueprintPure, Category=Ability)
	static UObject* GetSourceObjectFromSpec(const FGameplayAbilitySpec& Spec)
	{
		return Spec.SourceObject.Get();
	}
1 Like