# FindProperty

> Find shader properties.

## Definition

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

## FindProperty(string, MaterialProperty\[])

Find shader properties.

```csharp
protected static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the material property.**** (\[MaterialProperty\[]]\(/engine/6000.0/script-reference/unityeditor/materialproperty)): The array of available material properties.

### Returns

| Type                                                                                | Description                                  |
| ----------------------------------------------------------------------------------- | -------------------------------------------- |
| [MaterialProperty](/engine/6000.0/script-reference/unityeditor/materialproperty.md) | The material property found, otherwise null. |

### Remarks

This is a utility method that finds a MaterialProperty by name.

## FindProperty(string, MaterialProperty\[], bool)

Find shader properties.

```csharp
protected static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties, bool propertyIsMandatory)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the material property.**** (\[MaterialProperty\[]]\(/engine/6000.0/script-reference/unityeditor/materialproperty)): The array of available material properties.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If true then this method will throw an exception if a property with propertyName was not found.

### Returns

| Type                                                                                | Description                                  |
| ----------------------------------------------------------------------------------- | -------------------------------------------- |
| [MaterialProperty](/engine/6000.0/script-reference/unityeditor/materialproperty.md) | The material property found, otherwise null. |

### Remarks

This is a utility method that finds a MaterialProperty by name.
