# ShaderHasError(Shader)

> Checks if a shader has any compilation errors. Ignores warnings.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static bool ShaderHasError(Shader shader)
```

### Parameters

**** (\[Shader]\(/engine/6000.3/script-reference/unityengine/shader)): The shader to check for compilation errors.

### Returns

| Type                                                          | Description                                                                      |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the shader has any compilation errors. Otherwise, returns false. |
