FGameplayAbilitySpec::GetPrimaryInstance

Returns the primary instance, only valid on InstancedPerActor abilities (returns nullptr otherwise)