Skip to Content
API ReferenceFrameImage

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.

ParameterDescription
sourceA UnityEngine.Sprite or UnityEngine.Texture2D to display.
widthOptional explicit width in logical pixels.
heightOptional explicit height in logical pixels.
keyAn 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