Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

propertyName

The name of the material property.

The array of available material properties.

Returns

Type

Description

MaterialPropertyThe 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

propertyName

The name of the material property.

The array of available material properties.

propertyIsMandatory

If true then this method will throw an exception if a property with propertyName was not found.

Returns

Type

Description

MaterialPropertyThe material property found, otherwise null.

Remarks

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