UKismetRenderingLibrary::EnablePathTracing
#include "Kismet/KismetRenderingLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Enables or disables the path tracer for the current Game Viewport. Equivalent to the ShowFlag.PathTracing console command but callable from shipping builds.
Caveats & Gotchas
- • Requires the path tracer to actually be supported by the current RHI/hardware (DirectX 12 with a compatible GPU); on unsupported platforms this call has no visible effect.
- • Path tracing is extremely expensive and not suited to real-time gameplay framerates — this is intended for offline-quality preview/cinematic capture, not shipping gameplay rendering.
- • Being callable from shipping builds is unusual for a rendering debug feature, but it does not bypass hardware/RHI requirements.
Signature
static void EnablePathTracing(bool bEnablePathTracer) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bEnablePathTracer | bool | Whether to turn the path tracer on or off for the current Game Viewport. | — |
Return Type
void Example
Toggle path tracing for a cinematic capture C++
UKismetRenderingLibrary::EnablePathTracing(true);
// ... capture frames ...
UKismetRenderingLibrary::EnablePathTracing(false); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?