I am working with the new UAdditionalEffectsGameplayEffectComponent, however I notice that tags added to the spec via blueprint are not carried over to additional gameplay effect. It seems intentional in the design, however cannot figure out why. It would be nice to have the option.
void FGameplayEffectSpec::InitializeFromLinkedSpec(const UGameplayEffect* InDef, const FGameplayEffectSpec& OriginalSpec)
{
// We need to manually initialize the new GE spec. We want to pass on all of the tags from the originating GE Except for that GE’s asset tags. (InheritableGameplayEffectTags).
// But its very important that the ability tags and anything else that was added to the source tags in the originating GE carries over// Duplicate GE context
const FGameplayEffectContextHandle& ExpiringSpecContextHandle = OriginalSpec.GetEffectContext();
FGameplayEffectContextHandle NewContextHandle = ExpiringSpecContextHandle.Duplicate();// Make a full copy
CapturedSourceTags = OriginalSpec.CapturedSourceTags;// But then remove the tags the originating GE added
CapturedSourceTags.GetSpecTags().RemoveTags(OriginalSpec.Def->GetAssetTags());// Now initialize like the normal cstor would have. Note that this will add the new GE’s asset tags (in case they were removed in the line above / e.g., shared asset tags with the originating GE)
Initialize(InDef, NewContextHandle, OriginalSpec.GetLevel());// Finally, copy over set by called magnitudes
CopySetByCallerMagnitudes(OriginalSpec);
}