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

MaterialEditor.DefaultShaderProperty

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 void DefaultShaderProperty(MaterialProperty prop, string label);

Parameters

Parameter Description
prop The material property to draw UI for.
label The label to show for the property.

Description

Draws the default UI for a shader property, ignoring any custom drawers, using automatic layout.

This method is similar to MaterialEditor.ShaderProperty, except it ignores any custom MaterialPropertyDrawer that the shader defines for the property. This overload uses automatic layout. To set the position and size of the control, use the overload that takes a Rect.


Declaration

public void DefaultShaderProperty(Rect position, MaterialProperty prop, string label);

Parameters

Parameter Description
position The position and size of the control.
prop The material property to draw UI for.
label The label to show for the property.

Description

Draws the default UI for a shader property, ignoring any custom drawers, at a specified position.

This method is similar to MaterialEditor.ShaderProperty, except it ignores any custom MaterialPropertyDrawer that the shader defines for the property. This overload draws the control at position. To use automatic layout, use the overload without a Rect.