UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TraceScreenshot.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
CoreMinimal.h
"
6
#include "
Engine/World.h
"
7
8
#if !defined(UE_SCREENSHOT_TRACE_ENABLED)
9
#define UE_SCREENSHOT_TRACE_ENABLED UE_TRACE_ENABLED
10
#endif
11
12
#if UE_SCREENSHOT_TRACE_ENABLED
13
14
class
ULevel
;
15
16
class
FTraceScreenshot
17
{
18
public
:
19
20
// In no logging configurations all log categories are of type FNoLoggingCategory, which has no relation with
21
// FLogCategoryBase. In order to not need to conditionally set the argument alias the type here.
22
#if NO_LOGGING
23
typedef
FNoLoggingCategory
FLogCategoryAlias;
24
#else
25
typedef
FLogCategoryBase
FLogCategoryAlias;
26
#endif
27
28
static
ENGINE_API
void
RequestScreenshot(FString
Name
,
bool
bShowUI,
const
FLogCategoryAlias& LogCategory =
LogCore
);
29
30
/*
31
* Add the provided screenshot to the trace.
32
* @param InSizeX - The width of the screenshot.
33
* @param InSizeY - The heigth of the screenshot.
34
* @param InImageData - The data of the screenshot.
35
* @param InScreenshotName - The name of the screenshot.
36
* @param DesiredX - Optionally resize the image to the desired width before tracing. Aspect ratio is preserved.
37
*/
38
static
ENGINE_API
void
TraceScreenshot
(
int32
InSizeX
,
int32
InSizeY
,
const
TArray<FColor>
&
InImageData
,
const
FString&
InScreenshotName
,
int32
DesiredX
= -1);
39
static
ENGINE_API
void
TraceScreenshot
(
int32
InSizeX
,
int32
InSizeY
,
const
TArray<FLinearColor>
&
InImageData
,
const
FString&
InScreenshotName
,
int32
DesiredX
= -1);
40
44
static
bool
ShouldSuppressWritingToFile
() {
return
bSuppressWritingToFile
; }
45
49
static
ENGINE_API
void
Reset
();
50
51
private
:
52
ENGINE_API
FTraceScreenshot
();
53
FTraceScreenshot
(
const
FTraceScreenshot
&
Other
) {}
54
FTraceScreenshot
(
const
FTraceScreenshot
&&
Other
) {}
55
void
operator =(
const
FTraceScreenshot
&
Other
) {}
56
ENGINE_API
~FTraceScreenshot
();
57
ENGINE_API
void
Unbind();
58
59
private
:
60
static
ENGINE_API
bool
bSuppressWritingToFile
;
61
};
62
63
#endif
// UE_SCREENSHOT_TRACE_ENABLED
EARSessionStatus::Other
@ Other
CoreMinimal.h
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EPathFollowingVelocityMode::Reset
@ Reset
EVariantTypes::Name
@ Name
World.h
TArray
Definition
Array.h:670
ULevel
Definition
Level.h:423
FLogCategoryBase
Definition
LogCategory.h:21
Engine
Source
Runtime
Engine
Public
ProfilingDebugging
TraceScreenshot.h
Generated by
1.9.8