File size: 1,261 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | // Copyright Epic Games, Inc. All Rights Reserved.
#include "LyraInputConfig.h"
#include "LyraLogChannels.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraInputConfig)
ULyraInputConfig::ULyraInputConfig(const FObjectInitializer& ObjectInitializer)
{
}
const UInputAction* ULyraInputConfig::FindNativeInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const
{
for (const FLyraInputAction& Action : NativeInputActions)
{
if (Action.InputAction && (Action.InputTag == InputTag))
{
return Action.InputAction;
}
}
if (bLogNotFound)
{
UE_LOG(LogLyra, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
}
return nullptr;
}
const UInputAction* ULyraInputConfig::FindAbilityInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const
{
for (const FLyraInputAction& Action : AbilityInputActions)
{
if (Action.InputAction && (Action.InputTag == InputTag))
{
return Action.InputAction;
}
}
if (bLogNotFound)
{
UE_LOG(LogLyra, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
}
return nullptr;
}
|