Download

GAS how to get the Effect Target from the Effect Spec?

I have a Question about GAS.
I have created a custom UGameplayModMagnitudeCalculation. In the overwritten CalculateBaseMagnitude_Implementation function, I need the target of this effect. The effect for sure needs to know to whom it is applied.
I have the effect Spec but I can’t seem to find the target from it. While I can capture attributes and tags and also I 've found two GetContext Methods returning the same context, one const. Can someone tell me how I can get the target in this function without making a custom TargetData?
Thanks for your answer.

GameplayEffectContext should contain information about the target, but in any case you want to use GetCapturedAttributeMagnitude() to get the relevant target information, similar to how you would in GameplayEffectExecutionCalculation. See GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 4's GameplayAbilitySystem plug for an example / overall everything you need for GAS.