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
14class ULevel;
15
17{
18public:
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 */
40
45
49 static ENGINE_API void Reset();
50
51private:
55 void operator =(const FTraceScreenshot& Other) {}
57 ENGINE_API void Unbind();
58
59private:
61};
62
63#endif // UE_SCREENSHOT_TRACE_ENABLED
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
Definition Array.h:670
Definition Level.h:423
Definition LogCategory.h:21