// © 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" #include "OLSLog.h" DEFINE_LOG_CATEGORY(LogOLSInputConfigDataAsset); 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) { OLS_LOG(LogOLSInputConfigDataAsset, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), GET_TAG_NAME(inputTag), GET_UOBJECT_NAME(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) { OLS_LOG(LogOLSInputConfigDataAsset, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), GET_TAG_NAME(inputTag), GET_UOBJECT_NAME(this)); } return nullptr; }