# ShaderData

> This class describes a shader.

## Definition

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

```csharp
public class ShaderData
```

## Properties

| Property                                                                                                       | Description                                                                  |
| -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [ActiveSubshader](/engine/6000.0/script-reference/unityeditor/shaderdata/activesubshader.md)                   | Returns the active subshader or null if none is currently active.            |
| [ActiveSubshaderIndex](/engine/6000.0/script-reference/unityeditor/shaderdata/activesubshaderindex.md)         | Returns the index of the active subshader or -1 if none is currently active. |
| [SerializedSubshaderCount](/engine/6000.0/script-reference/unityeditor/shaderdata/serializedsubshadercount.md) | The number of serialized subshaders used by this shader.                     |
| [SourceShader](/engine/6000.0/script-reference/unityeditor/shaderdata/sourceshader.md)                         | The shader attached to this data set.                                        |
| [SubshaderCount](/engine/6000.0/script-reference/unityeditor/shaderdata/subshadercount.md)                     | The number of runtime subshaders used by this shader.                        |

## Methods

| Method                                                                                                     | Description                                          |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [GetSerializedSubshader](/engine/6000.0/script-reference/unityeditor/shaderdata/getserializedsubshader.md) | Obtains the serialized subshader at the given index. |
| [GetSubshader](/engine/6000.0/script-reference/unityeditor/shaderdata/getsubshader.md)                     | Obtains the runtime subshader at the given index.    |

## Classes

| Class                                                                                       | Description                                 |
| ------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [ShaderData.Pass](/engine/6000.0/script-reference/unityeditor/shaderdata/pass.md)           | This class describes a pass of a subshader. |
| [ShaderData.Subshader](/engine/6000.0/script-reference/unityeditor/shaderdata/subshader.md) | This class describes a subshader.           |

## Structs

| Struct                                                                                                          | Description                                                                                                                                                                    |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ShaderData.ConstantBufferInfo](/engine/6000.0/script-reference/unityeditor/shaderdata/constantbufferinfo.md)   | Provides resource layout information about a shader constant buffer.                                                                                                           |
| [ShaderData.ConstantInfo](/engine/6000.0/script-reference/unityeditor/shaderdata/constantinfo.md)               | Provides information about a shader constant (uniform) value.                                                                                                                  |
| [ShaderData.PreprocessedVariant](/engine/6000.0/script-reference/unityeditor/shaderdata/preprocessedvariant.md) | Represents the results of preprocessing a variant using [ShaderData.Pass.PreprocessVariant](/engine/6000.0/script-reference/unityeditor/shaderdata/pass/preprocessvariant.md). |
| [ShaderData.TextureBindingInfo](/engine/6000.0/script-reference/unityeditor/shaderdata/texturebindinginfo.md)   | Provides resource layout information about a texture binding.                                                                                                                  |
| [ShaderData.VariantCompileInfo](/engine/6000.0/script-reference/unityeditor/shaderdata/variantcompileinfo.md)   | Represents the results of compiling a variant using [ShaderData.Pass.CompileVariant](/engine/6000.0/script-reference/unityeditor/shaderdata/pass/compilevariant.md).           |
