[StateTreeDebugger]

- added option to disable state transitions
- added state transition breakpoints
- fixed scrubbing not using the right time (analysis time instead of world simulation time) when hitting a breakpoint
- fixed new instance auto selection on record when previous selection is a stale subtrack
- added console variable `statetree.displayitemids` to display states, tasks and transitions Ids in the StateTreeEditor (details view and state treeview)
#rb mikko.mononen

[CL 26128077 by yoan stamant in ue5-main branch]
This commit is contained in:
yoan stamant
2023-06-20 13:49:25 -04:00
parent 3433c06675
commit 7d4961a65f
29 changed files with 956 additions and 104 deletions

View File

@@ -340,6 +340,12 @@ bool FStateTreeCompiler::Compile(UStateTree& InStateTree)
StateTree->IDToStateMappings.Emplace(ToState.Key, FStateTreeStateHandle(ToState.Value));
}
// Store mapping between state transition identifier and compact transition index. Used for debugging purposes.
for (const TPair<FGuid, int32>& ToTransition: IDToTransition)
{
StateTree->IDToTransitionMappings.Emplace(ToTransition.Key, FStateTreeIndex16(ToTransition.Value));
}
UE::StateTree::Compiler::FCheckOutersArchive CheckOuters(*StateTree, *EditorData, Log);
StateTree->Serialize(CheckOuters);
@@ -790,10 +796,13 @@ bool FStateTreeCompiler::CreateStateTransitions()
for (FStateTreeTransition& Transition : SourceState->Transitions)
{
IDToTransition.Add(Transition.ID, StateTree->Transitions.Num());
FCompactStateTransition& CompactTransition = StateTree->Transitions.AddDefaulted_GetRef();
CompactTransition.Trigger = Transition.Trigger;
CompactTransition.Priority = Transition.Priority;
CompactTransition.EventTag = Transition.EventTag;
CompactTransition.bTransitionEnabled = Transition.bTransitionEnabled;
if (Transition.bDelayTransition)
{