Skip to content
SiteEmail

cohtml.RPStatusUtility

Provides utility functions for checking SRP Rendering Pipeline settings and status across the current render pipeline, camera, color space, and display output.

Name
enum classRPType { NotDefined, BuiltIn, HDRP, URP, CustomSRP}
Represents the type of active render pipeline in the project.
Name
RPTypeGetActivePipeline()
Determines the name of the currently active render pipeline.
boolIsHDRPipelineEnabled()
Checks if the active render pipeline supports HDR rendering. In URP, this depends on the pipeline asset’s supportsHDR flag. HDRP always supports HDR.
boolIsCameraHDREnabled(Camera cam)
Determines whether HDR is enabled on a specific camera.
boolIsLinearColorSpace()
Checks whether the project is using Linear color space.
boolIsHDRDisplayActive()
Checks whether an HDR display is currently active and available on the system.
boolIsRenderGraphCompatibleModeEnabled()
stringGetSummary(Camera cam)
Builds a human-readable summary of the current HDR configuration, including the active render pipeline, pipeline HDR support, camera HDR setting, color space, and HDR display output status.
EnumeratorValueDescription
NotDefinedNo Render Pipeline Type setup yet. Default value.
BuiltInNo render pipeline is active (Built-in Render Pipeline).
HDRPHigh Definition Render Pipeline (HDRP).
URPUniversal Render Pipeline (URP).
CustomSRPA custom Scriptable Render Pipeline.

Represents the type of active render pipeline in the project.

static RPType GetActivePipeline()

Determines the name of the currently active render pipeline.

Return: “Built-in” if no SRP is active, “URP” for Universal Render Pipeline, “HDRP” for High Definition Render Pipeline, or the type name of any other pipeline.

static bool IsHDRPipelineEnabled()

Checks if the active render pipeline supports HDR rendering. In URP, this depends on the pipeline asset’s supportsHDR flag. HDRP always supports HDR.

Return: True if HDR is supported by the current render pipeline; otherwise false.

static bool IsCameraHDREnabled(
Camera cam
)

Determines whether HDR is enabled on a specific camera.

Parameters:

  • cam The camera to check.

Return: True if the camera allows HDR rendering; otherwise false.

static bool IsLinearColorSpace()

Checks whether the project is using Linear color space.

Return: True if Linear color space is active; otherwise false (Gamma).

static bool IsHDRDisplayActive()

Checks whether an HDR display is currently active and available on the system.

Return: True if HDR display output is active and available; Available on Unity 2022.2 and newer using HDROutputSettings. Always returns false on older versions.

function IsRenderGraphCompatibleModeEnabled

Section titled “function IsRenderGraphCompatibleModeEnabled”
static bool IsRenderGraphCompatibleModeEnabled()
static string GetSummary(
Camera cam
)

Builds a human-readable summary of the current HDR configuration, including the active render pipeline, pipeline HDR support, camera HDR setting, color space, and HDR display output status.

Parameters:

  • cam The camera whose HDR setting should be checked.

Return: A formatted string summarizing the HDR state.