Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeNodeBase.h
mikko mononen 841dd874f1 StateTree: Renamed item to node
- Renamed uses of item to node
- Added base class for Conditions, Evals & Tasks

#jira UE-140363
#rb mieszko.zielinski
#preflight 61fa4083db42673a6020f1fb
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18841581 in //UE5/Release-5.0/... via CL 18841871 via CL 18842048
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18842354 by mikko mononen in ue5-main branch]
2022-02-03 09:13:49 -05:00

52 lines
1.4 KiB
C

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "StateTreeTypes.h"
#include "StateTreeNodeBase.generated.h"
/**
* Base struct of StateTree Conditions, Evaluators, and Tasks.
*/
USTRUCT()
struct STATETREEMODULE_API FStateTreeNodeBase
{
GENERATED_BODY()
FStateTreeNodeBase() = default;
virtual ~FStateTreeNodeBase() {}
/** @return Struct that represents the runtime data of the evaluator. */
virtual const UStruct* GetInstanceDataType() const { return nullptr; };
/**
* Called when the StateTree asset is linked. Allows to resolve references to other StateTree data.
* @see TStateTreeExternalDataHandle
* @see TStateTreeInstanceDataPropertyHandle
* @param Linker Reference to the linker
* @return true if linking succeeded.
*/
virtual bool Link(FStateTreeLinker& Linker) { return true; }
/** Name of the node. */
UPROPERTY(EditDefaultsOnly, Category = "", meta=(EditCondition = "false", EditConditionHides))
FName Name;
/** Property binding copy batch handle. */
UPROPERTY()
FStateTreeHandle BindingsBatch = FStateTreeHandle::Invalid;
/** The runtime data's data view index in the StateTreeExecutionContext, and source struct index in property binding. */
UPROPERTY()
uint16 DataViewIndex = 0;
/** Index in runtime instance storage. */
UPROPERTY()
uint16 InstanceIndex = 0;
/** True if the instance is an UObject. */
UPROPERTY()
uint8 bInstanceIsObject : 1;
};