Editor

Custom Unity Editor tooling for the InputSystem. Provides property drawers for binding configuration and a custom inspector for InputActionScheme assets, enabling visual binding assignment, callback validation, and action map management from the Inspector.

Architecture

spinner

Editor Components

Component
Type
Draws / Inspects
Purpose

Custom Editor

Custom inspector showing the asset field and bindings (conditionally)

Property Drawer

Foldable box rendering the binding dictionary as labeled entries

Property Drawer

Polymorphic binding selector with callback validation display

Visual Structure

The editor tooling composes into a nested display:

InputActionSchemeEditor
├── [Asset] InputActionAsset field
└── [Bindings] InputActionSchemeBindingsDrawer (foldable box)
    ├── "Movement" → InputActionMapBindingDrawer
    │   ├── [Header] Foldout + PolymorphicObjectField (select binding type)
    │   └── [Body] Callback validation list
    │       ├── ✅ Move → OnMove(Vector2)
    │       ├── ✅ Jump → OnJump()
    │       └── ❌ Sprint (no callback method found)
    ├── "Camera" → InputActionMapBindingDrawer
    │   └── ...
    └── "UI" → null (no binding assigned)

Key Patterns

Callback Validation

InputActionMapBindingDrawer uses reflection to discover methods marked with [InputActionCallback] on the binding class. It renders each action from the action map with a green check (✅) or red X (❌) indicating whether a matching callback method exists. This provides immediate feedback about missing or misconfigured callbacks.

Conditional Rendering

InputActionSchemeEditor only shows the bindings property when scheme.HasAsset is true. This prevents displaying an empty binding list when no InputActionAsset has been assigned.

Dependencies

Dependency
Usage

Odin Inspector

OdinValueDrawer<T>, OdinEditor, SirenixEditorGUI, SirenixEditorFields

Paragon.Editor

DrawGUI utility, ParagonDrawer<T> base class

UnityEditor

CustomEditor, ObjectNames, EditorGUI

Unity Input System

InputActionMap, InputAction

See Also

Last updated