Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsValidationSupported()

Returns whether the current graphics backend exposes a validation implementation.
Read time 1 minuteLast updated 10 days ago

Definition

public static bool IsValidationSupported()

Returns

Type

Description

booltrue if the active GraphicsDeviceType has a validation implementation; otherwise false.

Remarks

Use this as the first gate before calling any other GraphicsApiValidation member. On backends that don't implement validation, all other members are no-ops and return default values.
A return value of true doesn't guarantee that validation is actually running, only that it can be requested. Use GraphicsApiValidation.IsValidationActive to confirm the debug layer initialized successfully.

Examples

using UnityEngine;using UnityEngine.Rendering;public class Example : MonoBehaviour{ void Start() { if (!GraphicsApiValidation.IsValidationSupported()) { Debug.Log("Graphics validation isn't available on the current backend."); return; } // ... continue with validation-aware code ... }}