FrameImage
Displays a sprite or texture as a UI image. Maps to UIToolkit’s native Image element. The property accepts a UnityEngine.Sprite or a UnityEngine.Texture2D. It is typed as object? so the element can be declared in files that are compiled without Unity.
Constructor
FrameImage
Creates an FrameImage element.
| Parameter | Description |
|---|---|
source | A UnityEngine.Sprite or UnityEngine.Texture2D to display. |
width | Optional explicit width in logical pixels. |
height | Optional explicit height in logical pixels. |
key | An optional key for reconciliation identity. |
Properties
Height
The explicit height in logical pixels. Null means unconstrained.
Source
The image source. Expects a UnityEngine.Sprite or UnityEngine.Texture2D at runtime. Null displays nothing.
Width
The explicit width in logical pixels. Null means unconstrained.
Last updated on