文档

Unity Engine

Unity Engine

TexturePropertyWithHDRColor

Draws a texture property and an HDR color field on a single line, with HDR color picker settings.
阅读时间1 分钟最后更新于 21 天前

Definition

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

TexturePropertyWithHDRColor(GUIContent, MaterialProperty, MaterialProperty, ColorPickerHDRConfig, bool)

Draws a texture property and an HDR color field on a single line, with HDR color picker settings.
警告
Deprecated. Use TexturePropertyWithHDRColor(GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, bool showAlpha), true
public Rect TexturePropertyWithHDRColor(GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, ColorPickerHDRConfig hdrConfig, bool showAlpha)

Parameters

The label to show for the texture property.

textureProp

The texture property to draw.

colorProperty

The color property to show as an HDR color.

The HDR color picker settings. This overload ignores them.

showAlpha

Set to true to show the alpha channel in the color field. Set to false to hide it.

Returns

Type

Description

RectThe position and size of the line that the method drew.

Remarks

TexturePropertyWithHDRColor(GUIContent, MaterialProperty, MaterialProperty, bool)

Draws a texture property and an HDR color field on a single line.
public Rect TexturePropertyWithHDRColor(GUIContent label, MaterialProperty textureProp, MaterialProperty colorProperty, bool showAlpha)

Parameters

The label to show for the texture property.

textureProp

The texture property to draw.

colorProperty

The color property to show as an HDR color.

showAlpha

Set to true to show the alpha channel in the color field. Set to false to hide it.

Returns

Type

Description

RectThe position and size of the line that the method drew.

Remarks

The texture shows as a small thumbnail. Use this method for a compact view of a texture and an HDR color.