You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- added StateTree linker - added Link() method to tasks and evaluators - added templated item reference which makes getter code less error prone #jira none #ROBOMERGE-AUTHOR: mikko.mononen #ROBOMERGE-SOURCE: CL 17941680 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292) #ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0 [CL 17941733 by mikko mononen in ue5-release-engine-test branch]
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "StateTreeTypes.h"
|
|
#include "StateTreePropertyBindingCompiler.h"
|
|
|
|
class UStateTree;
|
|
class UStateTreeState;
|
|
class UStateTreeEditorData;
|
|
struct FStateTreeCondition;
|
|
struct FStateTreeConditionItem;
|
|
struct FStateTreeStateLink;
|
|
|
|
/**
|
|
* Helper class to convert StateTree editor representation into a compact baked data.
|
|
* Holds data needed during baking.
|
|
*/
|
|
struct STATETREEEDITORMODULE_API FStateTreeBaker
|
|
{
|
|
public:
|
|
bool Bake(UStateTree& InStateTree);
|
|
|
|
private:
|
|
enum class EBindingContainerType : uint8
|
|
{
|
|
Evaluator,
|
|
Task,
|
|
};
|
|
|
|
bool ResolveTransitionState(const UStateTreeState& SourceState, const TCHAR* ContextStr, const FStateTreeStateLink& Link, FStateTreeHandle& OutTransitionHandle) const;
|
|
FStateTreeHandle GetStateHandle(const FGuid& StateID) const;
|
|
|
|
bool CreateStates();
|
|
bool CreateStateRecursive(UStateTreeState& State, const FStateTreeHandle Parent);
|
|
bool CreateStateTransitions();
|
|
bool CreateCondition(const FStateTreeConditionItem& CondItem);
|
|
bool GetAndValidateBindings(const FStateTreeBindableStructDesc& TargetStruct, TArray<FStateTreeEditorPropertyBinding>& OutBindings) const;
|
|
bool IsPropertyAnyEnum(const FStateTreeBindableStructDesc& Struct, FStateTreeEditorPropertyPath Path) const;
|
|
|
|
UStateTree* StateTree = nullptr;
|
|
UStateTreeEditorData* TreeData = nullptr;
|
|
TMap<FGuid, int32> IDToState;
|
|
TArray<UStateTreeState*> SourceStates;
|
|
FStateTreePropertyBindingCompiler BindingsCompiler;
|
|
};
|