Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/Debugger/StateTreeTraceAnalyzer.h
yoan stamant 05bc614a8e [StateTreeDebugger]
- Added trace event for Phase (Push + Pop) to make it easier to recreate the event hierarchy when analyzing the traces.
- Merged enums EStateTreeTraceInstanceEventType and EStateTreeTraceNodeEventType to EStateTreeTraceEventType which is mainly a list of verbs that could be reused for different events (States, Instances, Tasks, etc.)
- EStateTreeUpdatePhase is no longer used as flags and reduced to uint8
- Phase events are stacked when producing traces and sent only if meaningful events (Task, State, Transition, etc.) are sent during their scope. This is to avoid sending useless events when the StateTree is ticked without any changes
#rnx
#rb mikko.mononen
#preflight 6474a5e62e05bcc3309d093e

[CL 25663847 by yoan stamant in ue5-main branch]
2023-05-29 10:13:21 -04:00

39 lines
952 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if WITH_STATETREE_DEBUGGER
#include "Trace/Analyzer.h"
class FStateTreeTraceProvider;
namespace TraceServices { class IAnalysisSession; }
class FStateTreeTraceAnalyzer : public UE::Trace::IAnalyzer
{
public:
FStateTreeTraceAnalyzer(TraceServices::IAnalysisSession& InSession, FStateTreeTraceProvider& InProvider);
virtual void OnAnalysisBegin(const FOnAnalysisContext& Context) override;
virtual void OnAnalysisEnd() override {}
virtual bool OnEvent(uint16 RouteId, EStyle Style, const FOnEventContext& Context) override;
private:
enum : uint16
{
RouteId_WorldTimestamp,
RouteId_Instance,
RouteId_Phase,
RouteId_LogMessage,
RouteId_State,
RouteId_Task,
RouteId_Transition,
RouteId_Condition,
RouteId_ActiveStates
};
TraceServices::IAnalysisSession& Session;
FStateTreeTraceProvider& Provider;
double WorldTime = 0;
};
#endif // WITH_STATETREE_DEBUGGER