// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/ObjectMacros.h" #include "GameSetting.h" class FWhenCondition : public FGameSettingEditCondition { public: FWhenCondition(TFunction&& InInlineEditCondition) : InlineEditCondition(InInlineEditCondition) { } virtual void GatherEditState(const ULocalPlayer* InLocalPlayer, FGameSettingEditableState& InOutEditState) const override { InlineEditCondition(InLocalPlayer, InOutEditState); } virtual FString ToString() const override { return TEXT("Inline Edit Condition"); } private: TFunction InlineEditCondition; };