# IsValidationRequested()

> Returns whether graphics API validation was requested via a backend-specific command line argument (for example, -force-d3d12-debug-as-errors on Direct3D 12).

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool IsValidationRequested()
```

### Returns

| Type                                                          | Description                                        |
| ------------------------------------------------------------- | -------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if validation was requested; otherwise false. |

### Remarks

A return value of true doesn't guarantee that validation is actually running. Use [GraphicsApiValidation.IsValidationActive](/engine/6000.7/script-reference/unityengine/rendering/graphicsapivalidation/isvalidationactive.md) to confirm the debug layer initialized successfully.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Rendering;

public class Example : MonoBehaviour
{
    void WarnIfRequestedButInactive()
    {
        if (GraphicsApiValidation.IsValidationRequested() && !GraphicsApiValidation.IsValidationActive())
            Debug.LogWarning("Graphics API validation was requested but the debug layer failed to initialize.");
    }
}
```
