GameTextureElement record
Displays a game-asset texture handle (boxed UnityEngine.Texture) at a fixed pixel size, optionally cropped to a UV sub-rect (for atlas icons such as profession crests). The framework re-pulls Texture (and Uv when set) each frame, so an icon whose async load finishes after the window builds still appears. Renderer-neutral — the handle crosses the boundary as Object. Null texture = an invisible box that keeps its layout slot. The simpler sibling of RenderTextureHostElement (no drag/zoom/pan, no backdrop) and of SpriteElement (which takes PNG bytes, not a live texture handle).
public record GameTextureElement : IEquatable<HudElement>Public Members
Section titled “Public Members”| name | description |
|---|---|
| GameTextureElement(…) | Displays a game-asset texture handle (boxed UnityEngine.Texture) at a fixed pixel size, optionally cropped to a UV sub-rect (for atlas icons such as profession crests). The framework re-pulls Texture (and Uv when set) each frame, so an icon whose async load finishes after the window builds still appears. Renderer-neutral — the handle crosses the boundary as Object. Null texture = an invisible box that keeps its layout slot. The simpler sibling of RenderTextureHostElement (no drag/zoom/pan, no backdrop) and of SpriteElement (which takes PNG bytes, not a live texture handle). |
| CornerRadius { get; set; } | Corner radius in px for the displayed box. 0 = square (default). Rounds via a stencil Mask. |
| Fill { get; set; } | When true the icon STRETCHES to fill the whole Width×Height box (no aspect-fit letterboxing) — use it to render an icon exactly like a stretched RawImage cell elsewhere (e.g. the meter’s debuff tiles). Default false = aspect-preserving letterbox. |
| Height { get; set; } | On-screen height in px. |
| Texture { get; set; } | Supplies the boxed texture to display (null while loading / unavailable). |
| Uv { get; set; } | Optional dynamic UV sub-rect (0..1, bottom-left origin); null = full texture. Both Funcs are invoked every frame while the element is active in the hierarchy (hidden windows/tabs are skipped; a late-loaded icon binds on its first visible frame) — keep them cheap (cache lookups, no allocation). |
| Width { get; set; } | On-screen width in px. |
See Also
Section titled “See Also”- record HudElement
- namespace Stellar.Abstractions.Services