Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ShaderProperty

Handes UI for one shader property.
Read time 3 minutesLast updated 5 days ago

Definition

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

ShaderProperty(MaterialProperty, string)

Handes UI for one shader property.
public void ShaderProperty(MaterialProperty prop, string label)

Parameters

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(MaterialProperty, GUIContent)

Handes UI for one shader property.
public void ShaderProperty(MaterialProperty prop, GUIContent label)

Parameters

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(MaterialProperty, string, int)

Handes UI for one shader property.
public void ShaderProperty(MaterialProperty prop, string label, int labelIndent)

Parameters


label


labelIndent

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(MaterialProperty, GUIContent, int)

Handes UI for one shader property.
public void ShaderProperty(MaterialProperty prop, GUIContent label, int labelIndent)

Parameters



labelIndent

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(Rect, MaterialProperty, string)

Handes UI for one shader property.
public void ShaderProperty(Rect position, MaterialProperty prop, string label)

Parameters

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(Rect, MaterialProperty, GUIContent)

Handes UI for one shader property.
public void ShaderProperty(Rect position, MaterialProperty prop, GUIContent label)

Parameters

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(Rect, MaterialProperty, string, int)

Handes UI for one shader property.
public void ShaderProperty(Rect position, MaterialProperty prop, string label, int labelIndent)

Parameters

position



label


labelIndent

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(Rect, MaterialProperty, GUIContent, int)

Handes UI for one shader property.
public void ShaderProperty(Rect position, MaterialProperty prop, GUIContent label, int labelIndent)

Parameters

position




labelIndent

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.

ShaderProperty(Shader, int)

Handes UI for one shader property.
Warning
Deprecated. Use ShaderProperty that takes MaterialProperty parameter instead.
public void ShaderProperty(Shader shader, int propertyIndex)

Parameters

shader


propertyIndex

Remarks

This function will draw appropriate UI for the given shader property, depending on its type.
Any custom MaterialPropertyDrawer objects defined for this property in the shader will also be applied. If you want to draw the "default" UI without any custom drawers, use MaterialEditor.DefaultShaderProperty function.