기술 자료

Unity Engine

Unity Engine

FindPropertyIndex(string)

Finds the index of a shader property by its name.
읽는 시간 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.