document.write("
// Fill out your copyright notice in the Description page of Project Settings. ADandelionPlayerState::ADandelionPlayerState() { AbilitySystemComponent = CreateDefaultSubobject<UAbilitySystemComponent>("AbilitySystemComponent"); } UAbilitySystemComponent* ADandelionPlayerState::GetAbilitySystemComponent() const { return AbilitySystemComponent; } void ADandelionPlayerState::InitAbilitySystem() const { const ADandelionPlayerCharacter* DandelionPlayerCharacter = CastChecked<ADandelionPlayerCharacter>(GetPawn()); if (!ensure(IsValid(DandelionPlayerCharacter))) { UE_LOG( LogTemplateCharacter, Error, TEXT("%s: Attempted InitAbilitySystem without a valid ADandelionPlayerCharacter."), *GetFullNameSafe(this) ) return; } for (const UDandelionAbilitySet* GameplayAbilitySet : DefaultGameplayAbilitySets) { GameplayAbilitySet->GiveAbilities( AbilitySystemComponent, DandelionPlayerCharacter->GetInputActionGameplayAbilityMappings() ); } }