I am working with an RTS Plugin and stumbled upon something that might be a bug in the GameplayAbilitySystem (GAS) of the Plugin which I’d like to fix. For this, I probably have to understand what is going on in this function:
bool UAbilitySystemComponent::TryActivateAbilityByClass(TSubclassOf<UGameplayAbility> InAbilityToActivate, bool bAllowRemoteActivation)
{
bool bSuccess = false;
for (const FGameplayAbilitySpec& Spec : ActivatableAbilities.Items)
{
if (Spec.Ability == InAbilityCDO)
{
bSuccess |= TryActivateAbility(Spec.Handle, bAllowRemoteActivation);
break;
}
}
return bSuccess;
}
I have trouble to find ANY reference to InAbilityCDO, Visual Studio cannot find it. This code compiles perfectly fine and belongs to a very large class.
Now InAbilityCDO should be the class default object of the InAbility, but I cannot find the definition of InAbilityCDO or how it is constructed. is this some engine magic which turns any variable with CDO as a suffix into a default class object? Thank you for any suggestion