cohtml.RPStatusUtility

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

Public Types

Name
enum classRPType { None, HDRP, URP, CustomSRP}
Represents the type of active render pipeline in the project.

Public Functions

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.

Public Types Documentation

enum RPType

EnumeratorValueDescription
NoneNo 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.

Public Functions Documentation

function GetActivePipeline

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.

function IsHDRPipelineEnabled

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.

function IsCameraHDREnabled

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.

function IsLinearColorSpace

static bool IsLinearColorSpace()

Checks whether the project is using Linear color space.

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

function IsHDRDisplayActive

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

static bool IsRenderGraphCompatibleModeEnabled()

function GetSummary

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.