ドキュメント

Unity Engine

Download Unity

Unity Engine

GetPropertyHeight

Calculates the height needed to draw a property, using its display name as the label.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

GetPropertyHeight(MaterialProperty)

Calculates the height needed to draw a property, using its display name as the label.
public float GetPropertyHeight(MaterialProperty prop)

Parameters

The property to calculate the height for.

Returns

Type

Description

floatThe height, in pixels, needed to draw the property.

Remarks

The height includes any custom MaterialPropertyDrawer that the shader defines for the property.

GetPropertyHeight(MaterialProperty, string)

Calculates the height needed to draw a property with a specified label.
public float GetPropertyHeight(MaterialProperty prop, string label)

Parameters

The property to calculate the height for.

label

The label to draw the property with.

Returns

Type

Description

floatThe height, in pixels, needed to draw the property.

Remarks

The height includes any custom MaterialPropertyDrawer that the shader defines for the property.