文档

Unity Engine

Unity Engine

Image

A VisualElement representing a source texture.
阅读时间6 分钟最后更新于 1 个月前

Definition

public class Image : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler

Remarks

Additional Resources: UXML element Image.
Note: This is the Image control for the UI Toolkit framework. This is not related to the UnityEngine.UI.Image

Static Fields

Value

Description

ussClassNameUSS class name of elements of this type.

Constructors

Constructor

Description

Image()Constructor.

Properties

Property

Description

imageThe texture to display in this image. If you assign a
Texture
or
Texture2D
, the Image element will resize and show the assigned texture.
scaleModeScaleMode used to display the Image.
sourceRectThe source rectangle inside the texture relative to the top left corner.
spriteThe sprite to display in this image.
tintColorTinting color for this Image.
uvThe base texture coordinates of the Image relative to the bottom left corner.
vectorImageThe VectorImage to display in this image.

Inheritance

Inherited Members