GetMaterialProperty
Obtains information about a shader property, identified by name, for a set of materials.
Read time 1 minuteLast updated 20 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
GetMaterialProperty(Object[], string)
Obtains information about a shader property, identified by name, for a set of materials.
public static MaterialProperty GetMaterialProperty(Object[] mats, string name)
Parameters
Returns
Type | Description |
|---|---|
| MaterialProperty | The material property with the specified name. |
Remarks
When you implement a custom material editor, pass to this method to get the property for all the selected materials. The method throws an exception if is null or contains a null element.
this.targetsmatsGetMaterialProperty(Object[], int)
Obtains information about a shader property, identified by index, for a set of materials.
public static MaterialProperty GetMaterialProperty(Object[] mats, int propertyIndex)
Parameters
Returns
Type | Description |
|---|---|
| MaterialProperty | The material property at the specified index. |
Remarks
When you implement a custom material editor, pass to this method to get the property for all the selected materials. The method throws an exception if is null or contains a null element.
this.targetsmats