Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeEditorModule/Private/StateTreeDebuggerCommands.cpp
yoan stamant 64c8dca7cb [StateTreeDebugger]
Initial version of the debugger
- currently compiled by StateTreeModule and StateTreeEditorModule using WITH_STATETREE_DEBUGGER
- currently not exposed to UI by StateTree settings 'bUseDebugger'
- in this version only one instance per asset can be debugged
- using Trace services to read events generated by statetree instances.
- can connect to any traces (Editor, Client, Server) as long as the compiled statetree matches
#rb mieszko.zielinski
#preflight 641088a30e1f02786b509663

[CL 24639409 by yoan stamant in ue5-main branch]
2023-03-14 13:35:46 -04:00

32 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#if WITH_STATETREE_DEBUGGER
#include "StateTreeDebuggerCommands.h"
#include "StateTreeEditorStyle.h"
#include "Styling/AppStyle.h"
#define LOCTEXT_NAMESPACE "StateTreeDebugger"
FStateTreeDebuggerCommands::FStateTreeDebuggerCommands()
: TCommands
(
"StateTreeEditor.Debugger", // Context name for fast lookup
LOCTEXT("StateTreeDebugger", "StateTree Debugger"), // Localized context name for displaying
NAME_None, // Parent context name
FStateTreeEditorStyle::Get().GetStyleSetName()
)
{
}
void FStateTreeDebuggerCommands::RegisterCommands()
{
UI_COMMAND(ToggleBreakpoint, "Toggle Breakpoint", "Adds or removes a breakpoint on each selected node", EUserInterfaceActionType::Button, FInputChord(EKeys::F9))
UI_COMMAND(Back, "Back", "Show previous recorded state", EUserInterfaceActionType::Button, FInputChord());
UI_COMMAND(Forward, "Forward", "Show next recorded state", EUserInterfaceActionType::Button, FInputChord());
}
#undef LOCTEXT_NAMESPACE
#endif // WITH_STATETREE_DEBUGGER