Vixen
feb85697
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.

⚠ Handed the IViewportPane, not the SceneViewport (#1303). A tool was narrowed to the members its consumers read; the overlay builder was the one signature still handing a plugin the whole pane — its bookmarks, its selection, its editing state. No overlay reads more than the narrow pane, so a declaration taking the concrete pane is refused (VXP0001 from the generator, a PluginException from the scan).

Fields and properties (5)

  • public string Id

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

  • public StringId Title

    What its header says, as a declaration — read in the current language on every frame (#1284).

  • public Action<UiElement, IViewportPane> 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 (5)

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