文档

Unity Engine

Unity Engine

TexturePropertySingleLine

Method for showing a texture property control with additional inlined properites.
阅读时间2 分钟最后更新于 1 个月前

Definition

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

TexturePropertySingleLine(GUIContent, MaterialProperty)

Method for showing a texture property control with additional inlined properites.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp)

Parameters

The label used for the texture property.

textureProp

The texture property.

Returns

Type

Description

RectReturns the Rect used.

Remarks

This method can be used if multiple controls is wanted on the same line. The texture is shown using the mini thumbnail. Usefull for compact representation of properties of up to three material properties. Additional Resources: MaterialEditor.TexturePropertyTwoLines, ShaderGUI.

TexturePropertySingleLine(GUIContent, MaterialProperty, MaterialProperty)

Method for showing a texture property control with additional inlined properites.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1)

Parameters

The label used for the texture property.

textureProp

The texture property.

extraProperty1

First optional property inlined after the texture property.

Returns

Type

Description

RectReturns the Rect used.

Remarks

This method can be used if multiple controls is wanted on the same line. The texture is shown using the mini thumbnail. Usefull for compact representation of properties of up to three material properties. Additional Resources: MaterialEditor.TexturePropertyTwoLines, ShaderGUI.

TexturePropertySingleLine(GUIContent, MaterialProperty, MaterialProperty, MaterialProperty)

Method for showing a texture property control with additional inlined properites.
public Rect TexturePropertySingleLine(GUIContent label, MaterialProperty textureProp, MaterialProperty extraProperty1, MaterialProperty extraProperty2)

Parameters

The label used for the texture property.

textureProp

The texture property.

extraProperty1

First optional property inlined after the texture property.

extraProperty2

Second optional property inlined after the extraProperty1.

Returns

Type

Description

RectReturns the Rect used.

Remarks

This method can be used if multiple controls is wanted on the same line. The texture is shown using the mini thumbnail. Usefull for compact representation of properties of up to three material properties. Additional Resources: MaterialEditor.TexturePropertyTwoLines, ShaderGUI.