# ShaderMessage

> Contains information about messages generated by Unity's Shader Compiler.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule
* **Implements:** [IEquatable\<ShaderMessage>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct ShaderMessage : IEquatable<ShaderMessage>
```

## Constructors

| Constructor                                                                                                                                           | Description                                                      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [ShaderMessage(System.String,UnityEditor.Rendering.ShaderCompilerMessageSeverity)](/engine/6000.5/script-reference/unityeditor/shadermessage/ctor.md) | Creates a new ShaderMessage with the given message and severity. |

## Properties

| Property                                                                                      | Description                                                                    |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [file](/engine/6000.5/script-reference/unityeditor/shadermessage/file.md)                     | The source file where the shader message was found.                            |
| [line](/engine/6000.5/script-reference/unityeditor/shadermessage/line.md)                     | The line of code where the shader message was found.                           |
| [message](/engine/6000.5/script-reference/unityeditor/shadermessage/message.md)               | The message returned by the Unity Shader Compiler.                             |
| [messageDetails](/engine/6000.5/script-reference/unityeditor/shadermessage/messagedetails.md) | An (optional) detailed message returned from the Unity Shader Compiler.        |
| [platform](/engine/6000.5/script-reference/unityeditor/shadermessage/platform.md)             | The specific platform where the Unity Shader Compiler discovered the message.  |
| [severity](/engine/6000.5/script-reference/unityeditor/shadermessage/severity.md)             | Indicates the severity of the message returned from the Unity Shader Compiler. |

## Methods

| Method                                                                                  | Description                                                  |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [Equals](/engine/6000.5/script-reference/unityeditor/shadermessage/equals.md)           | Compares two ShaderMessage on an element-by-element basis.   |
| [GetHashCode](/engine/6000.5/script-reference/unityeditor/shadermessage/gethashcode.md) | Generates a hash value based on the contents of the message. |

## Operators

| Operator                                                                                  | Description                                                             |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.5/script-reference/unityeditor/shadermessage/op-equality.md)   | Returns true if all memebers of the two arguments are equal.            |
| [operator !=](/engine/6000.5/script-reference/unityeditor/shadermessage/op-inequality.md) | Returns true if any of the elements of the two arguments are not equal. |
