Vixen
02b45cc4
csharp
public sealed class OverlayAttribute

Marks a static method as a panel floating over the scene pane.

Read the guide page for this →

As a annotation

Valid on
Method

Remarks

Doc 36 § D3. The method is what Build takes: it is handed a host element and the pane, and fills the first for the second.

[Overlay("Snapping", Corner = OverlayCorner.BottomLeft)] public static void Build(UiElement host, SceneViewport pane) { … }

⚠ A static method rather than a class, unlike Unity's [Overlay]. Unity's goes on an Overlay subclass because the base carries the docking state, the collapsed state and the display name. Ours has no base: an overlay is an Action<UiElement, SceneViewport>, its title is on the attribute, and where it sits is Corner. Same reasoning as CustomInspectorAttribute, and it matches the rest of the set.

⚠ Read by a scan of the assembly that declared it, and only for a plugin or a project script — see CustomInspectorAttribute for why that is bounded rather than the assembly scanning ADR-002 refuses. In-tree code registers a SceneOverlay directly.

Fields and properties (4)

  • public string Title

    What its header says.

  • public OverlayCorner Corner

    Where it sits.

  • public string Id

    Its id, or empty to derive one from the title.

  • public int Order

    Where among the overlays sharing a corner, low first.

Methods (1)

  • public OverlayAttribute(string title)

    Marks a static method as a panel floating over the scene pane.

Used by (1)

  • DeclaredContributionsVixen.Editor.App