ドキュメント

Unity Engine

Unity Engine

GetMaterialProperty

Get information about a single shader property.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

GetMaterialProperty(Object[], string)

Get information about a single shader property.
public static MaterialProperty GetMaterialProperty(Object[] mats, string name)

Parameters

The selected materials.

name

Property name.

Returns

Type

Description

MaterialPropertyReturns the property at the specified index.

Remarks

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

GetMaterialProperty(Object[], int)

Get information about a single shader property.
public static MaterialProperty GetMaterialProperty(Object[] mats, int propertyIndex)

Parameters

The selected materials.

propertyIndex

Property index.

Returns

Type

Description

MaterialPropertyReturns the property at the specified index.

Remarks

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