Download LyraStarterGame/Plugins/GameSettings/Source/Public/GameSettingAction.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 2.02 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Plugins/GameSettings/Source/Public/GameSettingAction.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Plugins/GameSettings/Source/Public/GameSettingAction.h
-
curl -L -o GameSettingAction.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Plugins/GameSettings/Source/Public/GameSettingAction.h
2.02 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| //-------------------------------------- | |
| // UGameSettingAction | |
| //-------------------------------------- | |
| class ULocalPlayer; | |
| DECLARE_DELEGATE_TwoParams(UGameSettingCustomAction, UGameSetting* /*Setting*/, ULocalPlayer* /*LocalPlayer*/) | |
| /** | |
| * | |
| */ | |
| UCLASS(MinimalAPI) | |
| class UGameSettingAction : public UGameSetting | |
| { | |
| GENERATED_BODY() | |
| public: | |
| UE_API UGameSettingAction(); | |
| public: | |
| DECLARE_EVENT_TwoParams(UGameSettingAction, FOnExecuteNamedAction, UGameSetting* /*Setting*/, FGameplayTag /*GameSettings_Action_Tag*/); | |
| FOnExecuteNamedAction OnExecuteNamedActionEvent; | |
| public: | |
| FText GetActionText() const { return ActionText; } | |
| void SetActionText(FText Value) { ActionText = Value; } | |
| void SetActionText(const FString& Value) { SetActionText(FText::FromString(Value)); } | |
| FGameplayTag GetNamedAction() const { return NamedAction; } | |
| void SetNamedAction(FGameplayTag Value) { NamedAction = Value; } | |
| bool HasCustomAction() const { return CustomAction.IsBound(); } | |
| void SetCustomAction(UGameSettingCustomAction InAction) { CustomAction = InAction; } | |
| UE_API void SetCustomAction(TFunction<void(ULocalPlayer*)> InAction); | |
| /** | |
| * By default actions don't dirty the settings, since the majority of them either do things you can't | |
| * revert, or they're things like show the credits or Eula. However if that's not true, set this flag | |
| * to true to fire the change event when this action is fired. | |
| */ | |
| void SetDoesActionDirtySettings(bool Value) { bDirtyAction = Value; } | |
| UE_API virtual void ExecuteAction(); | |
| protected: | |
| /** UGameSettingValue */ | |
| UE_API virtual void OnInitialized() override; | |
| protected: | |
| FText ActionText; | |
| FGameplayTag NamedAction; | |
| UGameSettingCustomAction CustomAction; | |
| bool bDirtyAction = false; | |
| }; | |