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:
Receives a filtered list of eligible types (concrete
IParagonComponent<TOwner>types not already on the subsystem).Renders them in a searchable Odin selector tree with custom display names and icons.
Fires the
onComponentSelectedcallback 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
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.
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
ParagonSubsystemDrawer — the drawer that opens this selector via the add button
ParagonBehaviourEditor — the editor managing the overall subsystem lifecycle
Last updated