# FindPropertyIndex(string)

> Finds the index of a shader property by its name.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public int FindPropertyIndex(string propertyName)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the shader property.

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### Remarks

You can use the index with functions such as [Shader.GetPropertyType](/engine/6000.7/script-reference/unityengine/shader/getpropertytype.md) and [Shader.GetPropertyFlags](/engine/6000.7/script-reference/unityengine/shader/getpropertyflags.md) to get more detailed property information. If Unity cannot find a property with the given name, the function returns -1.
