Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

MaterialEditor.GetPropertyHeight

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public float GetPropertyHeight(MaterialProperty prop);

Parameters

Parameter Description
prop The property to calculate the height for.

Returns

float The height, in pixels, needed to draw the property.

Description

Calculates the height needed to draw a property, using its display name as the label.

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


Declaration

public float GetPropertyHeight(MaterialProperty prop, string label);

Parameters

Parameter Description
prop The property to calculate the height for.
label The label to draw the property with.

Returns

float The height, in pixels, needed to draw the property.

Description

Calculates the height needed to draw a property with a specified label.

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