UiDocumentComponent
- Namespace: Turian.Engine.UI
- Source File: UiDocumentComponent.cs
Places a Guinevere UI in a scene. The UI comes from a .ui``Document asset, or — for user scripts — from an OnBuild delegate set in code. The component carries the document reference plus placement and scaling settings; a UiManager discovers it by walking the scene each frame.
Properties
Document
(AssetReferencenew(): The .ui document this panel renders. Empty when the UI is supplied via OnBuild.
StyleSheets
(List<AssetReference[]: Extra .uss stylesheets applied on top of the ones the document declares with <Style src>, lowest priority first.
Mode
(UiRenderMode) { get; set } = UiRenderMode.ScreenSpaceOverlay: Where the UI is drawn. Defaults to a full-screen overlay.
SortOrder
(int) { get; set }: Draw order among screen-space panels: lower values are composited first (further back).
ScaleMode
(UiScaleMode) { get; set } = UiScaleMode.ConstantPixelSize: How the panel's logical size tracks the framebuffer size (screen-space modes).
ReferenceResolution
(Int2) { get; set } = new(1920, 1080): Design resolution for ScaleWithScreenSize.
PanelSize
(Int2) { get; set } = new(1024, 640): Render-target size in pixels for WorldSpace.
OnBuild
(Action