51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
|
|
|
|
|
#include "DataAssets/OLSInputConfigDataAsset.h"
|
|
|
|
UOLSInputConfigDataAsset::UOLSInputConfigDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
|
{
|
|
}
|
|
|
|
const UInputAction* UOLSInputConfigDataAsset::FindNativeInputActionForTag(
|
|
const FGameplayTag& inputTag,
|
|
bool shouldLogNotFound) const
|
|
{
|
|
for (const FOLSInputAction& action : NativeInputActions)
|
|
{
|
|
if (action.InputAction && (action.InputTag == inputTag))
|
|
{
|
|
return action.InputAction;
|
|
}
|
|
}
|
|
|
|
if (shouldLogNotFound)
|
|
{
|
|
//Todo: replace this with our custom log.
|
|
//UE_LOG(LogLyra, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
const UInputAction* UOLSInputConfigDataAsset::FindAbilityInputActionForTag(
|
|
const FGameplayTag& inputTag,
|
|
bool shouldLogNotFound) const
|
|
{
|
|
for (const FOLSInputAction& action : AbilityInputActions)
|
|
{
|
|
if (action.InputAction && (action.InputTag == inputTag))
|
|
{
|
|
return action.InputAction;
|
|
}
|
|
}
|
|
|
|
if (shouldLogNotFound)
|
|
{
|
|
//Todo: replace this with our custom log.
|
|
//UE_LOG(LogLyra, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
|
|
}
|
|
|
|
return nullptr;
|
|
}
|