ドキュメント

Unity Engine

Download Unity

Unity Engine

DefaultShaderProperty

Draws the default UI for a shader property, ignoring any custom drawers, using automatic layout.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

DefaultShaderProperty(MaterialProperty, string)

Draws the default UI for a shader property, ignoring any custom drawers, using automatic layout.
public void DefaultShaderProperty(MaterialProperty prop, string label)

Parameters

The material property to draw UI for.

label

The label to show for the property.

Remarks

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.

DefaultShaderProperty(Rect, MaterialProperty, string)

Draws the default UI for a shader property, ignoring any custom drawers, at a specified position.
public void DefaultShaderProperty(Rect position, MaterialProperty prop, string label)

Parameters

position

The position and size of the control.

The material property to draw UI for.

label

The label to show for the property.

Remarks

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.