文档

Unity Engine

Unity Engine

GetMaterialPropertyNames(Object[])

Gets the shader property names of the materials you pass in.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static string[] GetMaterialPropertyNames(Object[] mats)

Parameters

The selected materials.

Returns

Type

Description

string[]Returns the material property names.

Remarks

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: MaterialProperty.