Vixen
02b45cc4
csharp
public record class SceneOverlay

A panel floating over a scene pane.

Read the guide page for this →

Remarks

Doc 36 § D4's AddOverlay, and Unity's [Overlay]. The scene pane already had chrome — a toolbar, a stats readout, a rubber-band — built by ViewportChrome as ordinary elements in Viewport.Overlay. What it did not have is a way for anything but the application to put something there.

⚠ Built once per pane, not once. Two panes side by side are two cameras, two view modes and two active tools, so an overlay showing any of that has to be two elements reading two SceneViewports. One element shared between panes would show the first pane's numbers over the second pane's picture, which is the failure ViewportChrome's own remarks describe for the toolbar.

⚠ The pane is handed in rather than fetched. An overlay that reached for ViewportLayout.Focused would be right for the focused pane and lying over every other one.

Fields and properties (5)

  • public string Id

    What everything refers to it by. Prefix a plugin's with the plugin's own id.

  • public string Title

    What its header says.

  • public Action<UiElement, SceneViewport> Build

    Fills a host element for one pane. Called once per pane.

  • public OverlayCorner Corner

    Where it sits.

  • public int Order

    Where among the overlays sharing a corner, low first.

Methods (1)

Used by (3)

  • DeclaredContributionTestsVixen.Editor.App.Tests
  • DeclaredContributionsVixen.Editor.App
  • ViewportChromeVixen.Editor.App