기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


ShaderProperty

Handes UI for one shader property.
읽는 시간 3분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

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.
경고
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.