# GetShaderMessageCount(Shader)

> Returns the number of errors and warnings generated by the Unity Shader Compiler for the given Shader.

## Definition

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

```csharp
public static int GetShaderMessageCount(Shader s)
```

### Parameters

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

### Returns

| Type                                                       | Description                                                               |
| ---------------------------------------------------------- | ------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of errors and warnings generated by the Unity Shader Compiler. |
