RealtimeStyleTransferRuntime/Source/LyraGame/Input/LyraInputConfig.h

64 lines
1.9 KiB
C
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
2022-09-13 07:18:28 +00:00
#include "Containers/Array.h"
2022-05-23 18:41:30 +00:00
#include "Engine/DataAsset.h"
#include "GameplayTagContainer.h"
2022-09-13 07:18:28 +00:00
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
2022-09-13 07:18:28 +00:00
#include "LyraInputConfig.generated.h"
2022-05-23 18:41:30 +00:00
class UInputAction;
2022-09-13 07:18:28 +00:00
class UObject;
struct FFrame;
2022-05-23 18:41:30 +00:00
/**
* FLyraInputAction
*
* Struct used to map a input action to a gameplay input tag.
*/
USTRUCT(BlueprintType)
struct FLyraInputAction
{
GENERATED_BODY()
public:
2022-09-13 07:18:28 +00:00
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
TObjectPtr<const UInputAction> InputAction = nullptr;
2022-05-23 18:41:30 +00:00
2022-09-13 07:18:28 +00:00
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (Categories = "InputTag"))
2022-05-23 18:41:30 +00:00
FGameplayTag InputTag;
};
/**
* ULyraInputConfig
*
* Non-mutable data asset that contains input configuration properties.
*/
UCLASS(BlueprintType, Const)
class ULyraInputConfig : public UDataAsset
{
GENERATED_BODY()
public:
ULyraInputConfig(const FObjectInitializer& ObjectInitializer);
2022-09-13 07:18:28 +00:00
UFUNCTION(BlueprintCallable, Category = "Lyra|Pawn")
2022-05-23 18:41:30 +00:00
const UInputAction* FindNativeInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound = true) const;
2022-09-13 07:18:28 +00:00
UFUNCTION(BlueprintCallable, Category = "Lyra|Pawn")
2022-05-23 18:41:30 +00:00
const UInputAction* FindAbilityInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound = true) const;
public:
// List of input actions used by the owner. These input actions are mapped to a gameplay tag and must be manually bound.
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (TitleProperty = "InputAction"))
TArray<FLyraInputAction> NativeInputActions;
// List of input actions used by the owner. These input actions are mapped to a gameplay tag and are automatically bound to abilities with matching input tags.
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (TitleProperty = "InputAction"))
TArray<FLyraInputAction> AbilityInputActions;
};