文档

Unity Engine

Unity Engine

TexturePropertySingleLine

Draws a texture property on a single line.
阅读时间1 分钟最后更新于 21 天前

Definition

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

TexturePropertySingleLine(GUIContent, MaterialProperty)

Draws a texture property on a single line.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp)

Parameters

The label to show for the texture property.

textureProp

The texture property to draw.

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 to show a texture and up to two related properties compactly on one line.

TexturePropertySingleLine(GUIContent, MaterialProperty, MaterialProperty)

Draws a texture property and one other property on a single line.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1)

Parameters

The label to show for the texture property.

textureProp

The texture property to draw.

extraProperty1

A property to draw after the texture, on the same line.

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 to show a texture and up to two related properties compactly on one line.

TexturePropertySingleLine(GUIContent, MaterialProperty, MaterialProperty, MaterialProperty)

Draws a texture property and two other properties on a single line.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, MaterialProperty extraProperty2)

Parameters

The label to show for the texture property.

textureProp

The texture property to draw.

extraProperty1

A property to draw after the texture, on the same line.

extraProperty2

A second property to draw after
extraProperty1
, on the same line.

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 to show a texture and up to two related properties compactly on one line.