GetPropertyHeight
Calculates the height needed to draw a property, using its display name as the label.
Read time 1 minuteLast updated 20 days ago
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 |
|---|---|
| float | The 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.
The label to draw the property with.
Returns
Type | Description |
|---|---|
| float | The height, in pixels, needed to draw the property. |
Remarks
The height includes any custom MaterialPropertyDrawer that the shader defines for the property.