ParagonSubsystemSelector

Searchable popup window for selecting a component type to add to a ParagonSubsystem. Built on Odin's GenericSelector<Type> with custom styling, icon support, and single-click selection.

Definition

Namespace: Paragon.Editor Assembly: Paragon.Editor.dll

public class ParagonSubsystemSelector : GenericSelector<Type>

Inheritance: GenericSelector<Type>ParagonSubsystemSelector

Remarks

This selector is shown as a dropdown popup anchored to the add button in the ParagonSubsystemDrawer. It:

  1. Receives a filtered list of eligible types (concrete IParagonComponent<TOwner> types not already on the subsystem).

  2. Renders them in a searchable Odin selector tree with custom display names and icons.

  3. Fires the onComponentSelected callback on selection (single-click or confirmation), then closes.

The popup is configured for immediate selection — ConfirmSelectionOnDoubleClick is disabled so single-click triggers selection. The search toolbar is always visible.

The selector is instantiated via the static Show() factory method and should not be constructed directly.

Quick Lookup

Goal
How

Show the selector

ParagonSubsystemSelector.Show(rect, title, types, onSelected, nameGetter, iconGetter)

Customize display names

Pass a nameGetter delegate

Customize icons

Pass an iconGetter delegate

Methods

Show (static factory)

Creates and displays the selector popup.

Parameter
Type
Description

buttonRect

Rect

The anchor rect for the dropdown (typically the add button's world bounds)

title

string

The title shown in the selector header

selectableTypes

IEnumerable<Type>

The types available for selection

onComponentSelected

Action<Type>

Callback invoked with the selected type

nameGetter

Func<Type, string>

Returns the display name for each type

iconGetter

Func<Type, ParagonIconType>

Returns the icon for each type (optional, defaults to LAYERS)

Returns: The created ParagonSubsystemSelector instance.

Examples

Showing the Selector Programmatically

See Also

Last updated