How To Create Config Window

Create a ScriptableObject type and mark it as a config window

Add [ConfigWindow] on the ScriptableObject class.

Add sections with [ConfigSection]

Each member that should appear in the config window must have [ConfigSection].

Notes:

  • The section name can be hierarchical, using / (example: Gameplay/Combat).

  • Order sorts sections in the left panel.

  • Description is shown under the section title in the toolbar when that section is selected.

  • Expanded defines the default expanded state for foldout sections.

Add optional section toolbar buttons with [ConfigSectionButton]

To add buttons to a section toolbar:

  • Mark a parameterless void method with [ConfigSectionButton("Section/Path")].

  • Ensure the section path matches the normalized path used by [ConfigSection] (same segments and casing after trimming).

5) Open the window

  • Double-click the created asset in the Project window.

Example

Last updated