FindProperty
Find shader properties.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
FindProperty(string, MaterialProperty[])
Find shader properties.
protected static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties)
Parameters
The name of the material property.
The array of available material properties.
Returns
Type | Description |
|---|---|
| MaterialProperty | 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.
protected static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties, bool propertyIsMandatory)
Parameters
The name of the material property.
The array of available material properties.
If true then this method will throw an exception if a property with propertyName was not found.
Returns
Type | Description |
|---|---|
| MaterialProperty | The material property found, otherwise null. |
Remarks
This is a utility method that finds a MaterialProperty by name.