Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/Debugger/IStateTreeTraceProvider.h
yoan stamant 1cd242d1dc [StateTree] debugger update
- moved debugger related files to a dedicated directory
- trace provider now allows to read all timelines associated to a given state tree asset instance
- added multiple slate widgets to manage tracks and timelines (directly inspired from RewindDebugger to make it easier to integrate the tools together eventually).
- added synchronized lists of instance names and timelines
- converted EStateTreeUpdatePhase to enum flags used to build frame details hierarchically
#preflight 645a57584c3ec54e6e65f494

[CL 25390252 by yoan stamant in ue5-main branch]
2023-05-09 12:57:56 -04:00

44 lines
2.0 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"
namespace UE::StateTreeDebugger { struct FInstanceDescriptor; }
struct FStateTreeInstanceDebugId;
class UStateTree;
class IStateTreeTraceProvider : public TraceServices::IProvider
{
public:
typedef TraceServices::ITimeline<FStateTreeTraceEventVariantType> FEventsTimeline;
/**
* Return all instances with events in the traces.
* @param OutInstances List of all instances with events in the traces regardless if they are active or not.
*/
virtual void GetInstances(TArray<UE::StateTreeDebugger::FInstanceDescriptor>& 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;
/**
* Execute given function receiving an event timeline for all timelines matching a given asset.
* @param StateTree Asset that must be used by the instance to be processed
* @param Callback Function called for timeline(s) matching the provided asset
* @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 UStateTree& StateTree, TFunctionRef<void(const FStateTreeInstanceDebugId ProcessedInstanceId, const FEventsTimeline&)> Callback) const = 0;
};
#endif // WITH_STATETREE_DEBUGGER