Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/Debugger/IStateTreeTraceProvider.h
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

31 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if WITH_STATETREE_DEBUGGER
#include "StateTreeTraceTypes.h"
#include "TraceServices/Model/AnalysisSession.h"
#include "TraceServices/Containers/Timelines.h"
struct FStateTreeDebuggerInstanceDesc;
struct FStateTreeInstanceDebugId;
class IStateTreeTraceProvider : public TraceServices::IProvider
{
public:
typedef TraceServices::ITimeline<FStateTreeTraceEventVariantType> FEventsTimeline;
virtual void GetActivateInstances(TArray<FStateTreeDebuggerInstanceDesc>& OutInstances) const = 0;
/**
* Execute given function receiving an event timeline for a given instance or all timelines if instance not specified.
* @param InstanceId Id of a specific instance to get the timeline for; could be an FStateTreeInstanceDebugId::Invalid to go through all timelines
* @param Callback Function called for timeline(s) matching the provided Id
* @return True if the specified instance was found for a given Id or at least one timeline was found when no specific Id is provided.
*/
virtual bool ReadTimelines(const FStateTreeInstanceDebugId InstanceId, TFunctionRef<void(const FStateTreeInstanceDebugId ProcessedInstanceId, const FEventsTimeline&)> Callback) const = 0;
};
#endif // WITH_STATETREE_DEBUGGER