What is it
ConfigEditorWindow is a Unity Editor window that edits ScriptableObject assets marked with [ConfigWindow].
How the window is opened
Double-click a ScriptableObject asset in the Project window.
If the asset type has
[ConfigWindow], it is opened as Config window.
You can also open it from editor code via:
ConfigEditorWindow.ShowWindow(ScriptableObject asset, Vector2? minSize = null, Vector2? maxSize = null, bool dockable = false)
What the UI looks like
The window is split into two panels:
Left panel:
Search field.
A list of configuration sections.
Sections can be hierarchical (using
/in the section name, e.g.Gameplay/Combat).Parent sections are shown as foldouts and can be expanded/collapsed.
Right panel:
The selected section title.
Optional section description (shown under the title).
All fields/entities assigned to that section.
Where sections come from
Sections are generated from the target asset members that have [ConfigSection].
A member without
[ConfigSection]is not included in the window sections list.If no members with
[ConfigSection]exist, the window shows:No configuration sections found. Add fields with ConfigSectionAttribute.
Section paths and hierarchy rules
Section paths are normalized as follows:
The path is split by
/.Empty segments are removed.
Each segment is trimmed.
The normalized path is re-joined with
/.
This normalization is used both for:
building the section hierarchy (e.g.
A/B/CcreatesA→B→C),matching section toolbar buttons declared via
[ConfigSectionButton].
Sorting and ordering
Sections are ordered by:
Orderfrom[ConfigSection],section name (ordinal string compare).
Section toolbar buttons
Methods on the configuration asset can add buttons to the selected section toolbar via [ConfigSectionButton].
The method must be:
void,parameterless.
The button belongs to the section path specified in the attribute.
The path must match the normalized section path used by
[ConfigSection].
The button label is generated from the method name using Unity nicified formatting.
Window title, icon, and sizing
[ConfigWindow] controls:
title: window title (fallback is the asset type name),IconName: optional Unity editor icon name used for the window title,LeftPanelWidth: preferred left panel width,Dockable: whether the window is opened as a dockable editor window.
Additionally, ConfigAssetOpener applies:
[ConfigWindowMinSize(width, height)]→window.minSize,[ConfigWindowMaxSize(width, height)]→window.maxSize.
Optional: hide the default inspector
If the asset type has [ConfigHideInspectorEditor(true)], its inspector shows a helper message instead of the default inspector UI:
Double-click on the asset to open the config window.
Last updated