You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Moved SmartObjects out of restricted folder Moved StateTree out of restricted folder Moved ZoneGraph out of restricted folder Moved ZoneGraphAnnotations out of restricted folder #jira UE-115297 #ROBOMERGE-OWNER: mieszko.zielinski #ROBOMERGE-AUTHOR: mieszko.zielinski #ROBOMERGE-SOURCE: CL 17648223 via CL 17648246 via CL 17648261 via CL 17648385 via CL 17648390 via CL 17648742 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v875-17642767) [CL 17648750 by mieszko zielinski in ue5-main branch]
42 lines
995 B
C
42 lines
995 B
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "StateTreeAnyEnum.generated.h"
|
|
|
|
/**
|
|
* Enum that can be any type in the UI. Helper class to deal with any enum in property binding.
|
|
*/
|
|
USTRUCT()
|
|
struct STATETREEMODULE_API FStateTreeAnyEnum
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
bool operator==(const FStateTreeAnyEnum& RHS) const
|
|
{
|
|
return Value == RHS.Value && Enum == RHS.Enum;
|
|
}
|
|
|
|
bool operator!=(const FStateTreeAnyEnum& RHS) const
|
|
{
|
|
return Value != RHS.Value || Enum != RHS.Enum;
|
|
}
|
|
|
|
/** Initializes the class and value to specific enum. The value is set to the first value of the enum or 0 if class is null */
|
|
void Initialize(UEnum* NewEnum)
|
|
{
|
|
Enum = NewEnum;
|
|
Value = Enum == nullptr ? 0 : int32(Enum->GetValueByIndex(0));
|
|
}
|
|
|
|
/** The enum integer value. */
|
|
UPROPERTY(EditAnywhere, Category = Enum)
|
|
uint32 Value = 0;
|
|
|
|
/** The enum class associated with this enum. */
|
|
UPROPERTY(EditAnywhere, Category = Enum)
|
|
UEnum* Enum = nullptr;
|
|
};
|
|
|