UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosVDRuntimeModule.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_CHAOS_VISUAL_DEBUGGER
6
11#include "Containers/Ticker.h"
12#include "Misc/ScopeRWLock.h"
14
15#define UE_API CHAOSVDRUNTIME_API
16
17namespace Chaos::VD
18{
20}
21
23class FText;
24
25/* Option flags that controls what should be recorded when doing a full capture **/
27{
28 Geometry = 1 << 0,
29 Particles = 1 << 1,
30};
32
38
40
42{
43public:
44
46 static UE_API bool IsLoaded();
47
48 UE_API virtual void StartupModule() override;
49 UE_API virtual void ShutdownModule() override;
50
54 UE_API void StartRecording(TConstArrayView<FString> Args);
55
60
61 /* Stops an active recording */
62 UE_API void StopRecording();
63
65 bool IsRecording() const
66 {
67 return bIsRecording;
68 }
69
72
73 static FDelegateHandle RegisterRecordingStartedCallback(const FChaosVDRecordingStateChangedDelegate::FDelegate& InCallback)
74 {
76 return RecordingStartedDelegate.Add(InCallback);
77 }
78
79 static FDelegateHandle RegisterPostRecordingStartedCallback(const FChaosVDRecordingStateChangedDelegate::FDelegate& InCallback)
80 {
83 }
84
85 static FDelegateHandle RegisterRecordingStopCallback(const FChaosVDRecordingStateChangedDelegate::FDelegate& InCallback)
86 {
89 }
90
91 static FDelegateHandle RegisterRecordingStartFailedCallback(const FChaosVDRecordingStartFailedDelegate::FDelegate& InCallback)
92 {
95 }
96
97 static FDelegateHandle RegisterFullCaptureRequestedCallback(const FChaosVDCaptureRequestDelegate::FDelegate& InCallback)
98 {
101 }
102
104 {
106 return RecordingStartedDelegate.Remove(InDelegateToRemove);
107 }
108
110 {
113 }
114
116 {
119 }
120
122 {
125 }
126
128 {
131 }
132
134 float GetAccumulatedRecordingTime() const
135 {
137 }
138
140 UE_DEPRECATED(5.7, "This method is no longer used. Use GetCurrentTraceSessionDetails")
141 UE_API FString GetLastRecordingFileNamePath() const;
142
145
147 {
149 }
150
153
159
164
170
175
177 {
179 }
180
181private:
182
183 void RelayTraceData();
184
187
189 UE_API void StopTrace();
190
192 UE_API bool RequestFullCapture(float DeltaTime);
193
195 UE_API bool RecordingTimerTick(float DeltaTime);
196
198
203
205
209
210 bool bIsRecording = false;
211 bool bRequestedStop = false;
212
213 float AccumulatedRecordingTime = 0.0f;
214
218
221
222 static UE_API FChaosVDRecordingStateChangedDelegate RecordingStartedDelegate;
227
228 std::atomic<int32> LastGeneratedID;
229
231
234
237
239
241
243};
244#endif
245
246#undef UE_API
EChaosVDTransportMode
Definition ChaosVDRecordingDetails.h:20
EChaosVDRecordingMode
Definition ChaosVDRecordingDetails.h:11
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_RetVal(ReturnValueType, DelegateName)
Definition DelegateCombinations.h:41
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
#define DECLARE_MULTICAST_DELEGATE(DelegateName)
Definition DelegateCombinations.h:23
#define DECLARE_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:49
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UE_API
Definition SColorGradingComponentViewer.h:12
Definition IDelegateInstance.h:14
Definition Text.h:385
EConnectionType
Definition TraceAuxiliary.h:78
Definition ModuleInterface.h:14
virtual void ShutdownModule()
Definition ModuleInterface.h:55
virtual void StartupModule()
Definition ModuleInterface.h:31
Definition UnrealString.h.inl:34
Definition UniquePtr.h:107
Definition CriticalSection.h:14
Definition ScopeRWLock.h:60
Definition ChaosVDEngineEditorBridge.h:7
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
Definition ChaosVDRecording.h:416
Definition ChaosVDRecordingDetails.h:34
Definition ChaosVDRecordingDetails.h:53