ドキュメント

Unity Engine

Unity Engine

FindPropertyIndex(string)

Finds the index of a shader property by its name.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public int FindPropertyIndex(string propertyName)

Parameters

propertyName

The name of the shader property.

Returns

Type

Description

int

Remarks

You can use the index with functions such as Shader.GetPropertyType and Shader.GetPropertyFlags to get more detailed property information. If Unity cannot find a property with the given name, the function returns -1.