MaterialEditor.GetMaterialProperty

Declaration

public static MaterialProperty GetMaterialProperty(Object[] mats, string name);

Declaration

public static MaterialProperty GetMaterialProperty(Object[] mats, int propertyIndex);

Parameters

mats The selected materials.
name Property name.
propertyIndex Property index.

Returns

MaterialProperty Returns the property at the specified index.

Description

Get information about a single shader property.

When implementing custom MaterialEditors, you'd usually pass the this.targets array to this function, where this.targets is all the selected materials.

Additional resources: GetMaterialProperties, MaterialProperty.


Did you find this page useful? Please give it a rating: