Download LyraStarterGame/Source/LyraGame/GameFeatures/GameFeatureAction_AddInputBinding.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/GameFeatures/GameFeatureAction_AddInputBinding.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/GameFeatures/GameFeatureAction_AddInputBinding.h
-
curl -L -o GameFeatureAction_AddInputBinding.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/GameFeatures/GameFeatureAction_AddInputBinding.h
2.07 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class AActor; | |
| class UInputMappingContext; | |
| class UPlayer; | |
| class APlayerController; | |
| struct FComponentRequestHandle; | |
| class ULyraInputConfig; | |
| /** | |
| * Adds InputMappingContext to local players' EnhancedInput system. | |
| * Expects that local players are set up to use the EnhancedInput system. | |
| */ | |
| UCLASS(MinimalAPI, meta = (DisplayName = "Add Input Binds")) | |
| class UGameFeatureAction_AddInputBinding final : public UGameFeatureAction_WorldActionBase | |
| { | |
| GENERATED_BODY() | |
| public: | |
| //~ Begin UGameFeatureAction interface | |
| virtual void OnGameFeatureActivating(FGameFeatureActivatingContext& Context) override; | |
| virtual void OnGameFeatureDeactivating(FGameFeatureDeactivatingContext& Context) override; | |
| //~ End UGameFeatureAction interface | |
| //~ Begin UObject interface | |
| virtual EDataValidationResult IsDataValid(class FDataValidationContext& Context) const override; | |
| //~ End UObject interface | |
| UPROPERTY(EditAnywhere, Category="Input", meta=(AssetBundles="Client,Server")) | |
| TArray<TSoftObjectPtr<const ULyraInputConfig>> InputConfigs; | |
| private: | |
| struct FPerContextData | |
| { | |
| TArray<TSharedPtr<FComponentRequestHandle>> ExtensionRequestHandles; | |
| TArray<TWeakObjectPtr<APawn>> PawnsAddedTo; | |
| }; | |
| TMap<FGameFeatureStateChangeContext, FPerContextData> ContextData; | |
| //~ Begin UGameFeatureAction_WorldActionBase interface | |
| virtual void AddToWorld(const FWorldContext& WorldContext, const FGameFeatureStateChangeContext& ChangeContext) override; | |
| //~ End UGameFeatureAction_WorldActionBase interface | |
| void Reset(FPerContextData& ActiveData); | |
| void HandlePawnExtension(AActor* Actor, FName EventName, FGameFeatureStateChangeContext ChangeContext); | |
| void AddInputMappingForPlayer(APawn* Pawn, FPerContextData& ActiveData); | |
| void RemoveInputMapping(APawn* Pawn, FPerContextData& ActiveData); | |
| }; | |