DefaultShaderProperty
Draws the default UI for a shader property, ignoring any custom drawers, using automatic layout.
Read time 1 minuteLast updated 21 days ago
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.
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
The position and size of the control.
The material property to draw UI for.
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 . To use automatic layout, use the overload without a Rect.
position