SceneSelectMenu

Internal popup menu for selecting scenes from a filtered list. Uses Odin's GenericSelector<Scene> to display a searchable, icon-decorated dropdown.

Definition

Namespace: Paragon.Core.SceneManagement.Editor Assembly: Paragon.Editor.dll

internal class SceneSelectMenu

Remarks

SceneSelectMenu is a reusable popup component used by both SceneGraphEditor (to add scenes to the graph) and SceneNodeDrawer (to add dependencies). It wraps Odin's GenericSelector<Scene> with:

  • Searchable list with search toolbar enabled

  • Scene icons using DrawGUI.Icon.Paragon.Unity

  • Path preview in the footer showing the relative path of the hovered scene

  • Auto-sizing based on the number of selectable scenes

The popup is positioned relative to the triggering button rect and auto-closes after selection or when the window loses focus.

Quick Lookup

Goal
How

Show the picker

menu.Show(buttonRect, scenes, onSelected)

Reuse across repaints

Create once, call Show() each time

Methods

Show

Displays the scene selection popup.

Parameter
Type
Description

buttonRect

Rect

Screen-space rect of the triggering button (used for positioning)

selectableScenes

List<Scene>

Filtered list of scenes available for selection

onSelected

Action<Scene>

Callback invoked when a scene is confirmed

circle-info

Selection behavior: Single-click changes the footer path preview. Double-click confirms the selection and invokes the callback. The window auto-closes after confirmation.

Common Pitfalls

circle-exclamation
circle-exclamation

See Also

Last updated