UiManager

Finds the UiDocumentComponents in a scene and composites the screen-space ones into a single texture. A host calls RenderOverlay once per rendered frame with the root being drawn, and assigns the result to the renderer's overlay slot.

Remarks

World-space panels are ignored here — they render to their own quads. Discovery is a tree walk each frame, which is cheap for the handful of panels a scene carries and avoids any registration-order coupling with the component lifecycle.

Public Methods

RenderOverlay

public Texture? RenderOverlay(Node root, int framebufferWidth, int framebufferHeight, float deltaTime)

Renders every enabled screen-space UiDocumentComponent found under root, in SortOrder order, into one shared surface.

Parameters:

  • root (Node): The scene root being rendered this frame.
  • framebufferWidth (int): Target width in physical pixels, greater than zero.
  • framebufferHeight (int): Target height in physical pixels, greater than zero.
  • deltaTime (float): Seconds since the previous frame.

Returns: Texture?

  • The composited texture, or null when there is nothing to draw.

TryRenderOverlay

public Texture? TryRenderOverlay(Node root, int framebufferWidth, int framebufferHeight, float deltaTime)

As RenderOverlay, but swallows and logs any exception and returns null, so a fault in a document, stylesheet or controller cannot blank the whole viewport frame. Editor viewports and the play loop call this.

Parameters:

  • root (Node): The scene root being rendered this frame.
  • framebufferWidth (int): Target width in physical pixels, greater than zero.
  • framebufferHeight (int): Target height in physical pixels, greater than zero.
  • deltaTime (float): Seconds since the previous frame.

Returns: Texture?

RenderWorldPanels

public IReadOnlyList<WorldUiQuad> RenderWorldPanels(Node root, WorldUiFrame frame)

Renders every enabled WorldSpace panel under root to its own texture and returns each as a WorldUiQuad: a unit quad (1 m wide, PanelSize.Y / PanelSize.X m tall) at the node's world transform. A host feeds the result to SceneViewerService.WorldUiSource.

Parameters:

  • root (Node): The scene root being rendered this frame.
  • frame (WorldUiFrame): The render target (camera, size) the world panels are rasterised against.

Returns: IReadOnlyList<WorldUiQuad>

Dispose

public void Dispose()