文档

Unity Engine

Download Unity

Unity Engine

GetPropertyHeight

Calculates the height needed to draw a property, using its display name as the label.
阅读时间1 分钟最后更新于 22 天前

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.