Image
A VisualElement representing a source texture.
Read time 8 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
[UxmlElement(libraryPath = "Controls")][Icon("UIToolkit/Icons/Image.png")]public class Image : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
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 |
|---|---|
| ussClassName | USS class name of elements of this type. |
Constructors
Constructor | Description |
|---|---|
| Image() | Constructor. |
Properties
Property | Description |
|---|---|
| image | The texture to display in this image. If you assign a |
| scaleMode | ScaleMode used to display the Image. |
| sourceRect | The source rectangle inside the texture relative to the top left corner. |
| sprite | The sprite to display in this image. |
| tintColor | Tinting color for this Image. |
| uv | The base texture coordinates of the Image relative to the bottom left corner. |
| vectorImage | The VectorImage to display in this image. |