Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeEditorModule/Public/StateTreeEditingSubsystem.h
jurre debaare 1454040a2b StateTree editor
- StateTreeEditorMode, which now holds all of the state-tree editing behavior previously part of StateTreeEditor
- StateTreeEditorModeToolkit, responsible for UI/widgets used by StateTreeEditorMode
- StateTreeEditorModeUILayer used to host StateTreeEditorMode inside of the StateTreeEditor
- Exposed StateTreeViewModel
- Introduced IStateTreeEditorHost, interface to-be implemented for supporting StateTreeEditorMode within an Asset editor
- Moved compilation/validation to UStateTreeEditingSubsystem (editor sub system)
- Added layout extensions for StateTreeEditor

#rb Patrick.Boutot

[CL 35491719 by jurre debaare in ue5-main branch]
2024-08-13 09:09:54 -04:00

38 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "StateTree.h"
#include "StateTreeViewModel.h"
#include "EditorSubsystem.h"
#include "StateTreeEditingSubsystem.generated.h"
class SWidget;
class FStateTreeViewModel;
class FUICommandList;
struct FStateTreeCompilerLog;
UCLASS()
class STATETREEEDITORMODULE_API UStateTreeEditingSubsystem : public UEditorSubsystem
{
GENERATED_BODY()
public:
UStateTreeEditingSubsystem() {}
TSharedRef<FStateTreeViewModel> FindOrAddViewModel(const TNonNullPtr<UStateTree> InStateTree);
static bool CompileStateTree(const TNonNullPtr<UStateTree>InStateTree, FStateTreeCompilerLog& InOutLog);
static TSharedRef<SWidget> GetStateTreeView(TSharedRef<FStateTreeViewModel> InViewModel, const TSharedRef<FUICommandList>& TreeViewCommandList);
// Validates asset state
static void ValidateStateTree(const TNonNullPtr<UStateTree> InStateTree);
// Calculates editor data hash of the asset.
static uint32 CalculateStateTreeHash(const TNonNullPtr<const UStateTree> InStateTree);
protected:
TMap<TSoftObjectPtr<UStateTree>, TSharedPtr<FStateTreeViewModel>> StateTreeViewModels;
};