Class ScyllaInputWizard
Guided 9-step setup wizard for the Scylla Input module built with UI Toolkit. Extends Scylla.Core.Editor.ScyllaWizardWindowBase with the Sidebar layout to walk the user through every aspect of Input module configuration and generate the required assets.
Inheritance
Inherited Members
Namespace: Scylla.Input.Editor
Assembly: ScyllaInput.Editor.dll
Syntax
public sealed class ScyllaInputWizard : ScyllaWizardWindowBase
Remarks
The wizard defines nine steps, indexed 0-8, organized into two sidebar groups:
- Step 0 - Introduction (ungrouped): overview of what the wizard does. No user input; advances with Next.
- Setup group
- Step 1 - Game Profile: choice cards for six game genres. Pre-populates buffering, dead zone, and scheme-switch defaults. Validates that a Scylla.Core.ScyllaBootstrap exists in the scene.
- Step 2 - Input Actions: choice cards for "Create Simple", "Create Advanced", or "Use Existing" asset. Shows or hides an
ObjectFieldfor the existing asset path. - Step 3 - Input Contexts: choice cards for default context set (Gameplay/Menu/Console/Global) or manual configuration.
- Step 4 - Platforms: toggle group for Keyboard and Mouse (always required), Xbox, PlayStation, Nintendo, and Touch.
- Settings group
- Step 5 - Binding: toggle for rebinding, storage backend dropdown (JSON File / PlayerPrefs), optional storage folder, rebind timeout slider, auto-save and auto-load toggles.
- Step 6 - Buffering (conditionally visible): enable toggle, buffer window slider, max buffered inputs slider. Visible only when the selected game profile enables buffering.
- Step 7 - Output: output folder path, and asset names for Input Configuration, Context Configuration, and (if creating) the Input Action Asset.
- Step 8 - Review and Create: shows per-step summary cards and executes asset creation when the Finish button is clicked.
Slider controls (Rebind Timeout, Buffer Window, Max Buffered Inputs) use
showInputField = true so the current value is displayed and editable
numerically alongside the track. Form fields in steps 5-7 use
Scylla.Input.Editor.ScyllaInputWizard.ApplyFormFieldAlignment<T>(UnityEngine.UIElements.BaseField<T>) to fix the label column at
Scylla.Input.Editor.ScyllaInputWizard.FORM_LABEL_WIDTH pixels so all input controls align vertically
regardless of label length.
The Finish button label is "Create Input Setup" via
Scylla.Core.Editor.ScyllaWizardWindowBase.GetFinishLabel(). The last step is a pre-action
review, so Scylla.Core.Editor.ScyllaWizardWindowBase.LockNavigationOnLastStep returns
false to keep Cancel and Back available until the user commits.
Session state is cleared by ShowWizard() every time the wizard is opened, ensuring it always starts at the Introduction step.
Properties
LockNavigationOnLastStep
Whether Cancel and Back should be hidden on the wizard's last step. Default
is true, appropriate for wizards whose last step is a post-completion
status page (e.g. the Setup Wizard's "Complete" step). Wizards whose final step
is a pre-action review where the user might still want to revise or cancel
should override this to return false.
Declaration
protected override bool LockNavigationOnLastStep { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Remarks
The Input Wizard's last step is "Review & Create" - a pre-action review where the user may still want to revise selections or cancel. The actual setup runs only when Finish is clicked, so Cancel and Back must remain available on the last step.
Methods
BuildStepContent(int, VisualElement)
Dispatches step content construction to the appropriate Build*Step method
based on stepIndex. Called by the wizard base whenever a step
is navigated to or the current step's content area is refreshed.
Declaration
protected override void BuildStepContent(int stepIndex, VisualElement stepRoot)
Parameters
| Type | Name | Description |
|---|---|---|
| int | stepIndex | The zero-based index of the step to render. |
| VisualElement | stepRoot | The scrollable content container to add step UI elements to. |
Overrides
DefineSteps()
Defines all 9 wizard steps in order. The Introduction step is ungrouped and sits at the top of the sidebar. Steps 1-4 belong to the "Setup" sidebar group and steps 5-8 belong to the "Settings" sidebar group. The Buffering step (index 6) starts hidden and is shown or hidden by Scylla.Input.Editor.ScyllaInputWizard.ApplyProfileDefaults() based on the game profile selection.
Declaration
protected override ScyllaWizardWindowBase.WizardStepDef[] DefineSteps()
Returns
| Type | Description |
|---|---|
| WizardStepDef[] | An array of 9 Scylla.Core.Editor.ScyllaWizardWindowBase.WizardStepDef instances defining the wizard flow. |
Overrides
GetFinishLabel()
Returns "Create Input Setup" as the Finish button label to make the commit action explicit - the wizard creates assets and modifies the scene when clicked.
Declaration
protected override string GetFinishLabel()
Returns
| Type | Description |
|---|---|
| string |
Overrides
GetLayout()
Returns Scylla.Core.Editor.ScyllaWizardWindowBase.WizardLayout.Sidebar so the wizard uses a vertical step list on the left. The Sidebar layout is appropriate here because the wizard has 9 steps, which exceeds the 6-step practical limit for the TopBar layout.
Declaration
protected override ScyllaWizardWindowBase.WizardLayout GetLayout()
Returns
| Type | Description |
|---|---|
| ScyllaWizardWindowBase.WizardLayout |
Overrides
OnStepChanged(int)
Responds to step navigation by running deferred initialization. On the Game Profile step, lazy-initializes the wizard options and detects existing scene setup. On the Platforms step, lazy-initializes the platform toggle items. On the Review step, rebuilds the per-step summary cache so the displayed summary reflects the latest user selections.
Declaration
protected override void OnStepChanged(int newIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | newIndex | The zero-based index of the step that was just navigated to. |
Overrides
OnStepCompleted(int)
Responds to a successful step completion. On the Game Profile step, applies the profile-specific defaults (buffering, dead zone, scheme cooldown) and updates the Buffering step's visibility. On the Review step, executes the full input setup (asset creation, module wiring) via Scylla.Input.Editor.ScyllaInputWizard.ExecuteSetup().
Declaration
protected override void OnStepCompleted(int stepIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | stepIndex | The zero-based index of the step that was just completed. |
Overrides
OnWizardFinished()
Called after the user clicks "Create Input Setup" and the Review step completes. If the ScyllaInput module was found or created, selects its GameObject in the Unity Editor hierarchy so the user can immediately inspect the configured module.
Declaration
protected override void OnWizardFinished()
Overrides
ShowWizard()
Opens the Scylla Input Wizard window, always starting from the Introduction step. Any previously persisted step state is cleared via Scylla.Core.Editor.ScyllaWizardWindowBase.ResetWizardSessionState<T>() before the window is shown so the user always starts fresh regardless of how a prior session ended.
Declaration
public static void ShowWizard()
ValidateStep(int)
Validates the current step before allowing the user to advance. Returns false
to block the Next button for steps with unresolved preconditions:
Declaration
protected override bool ValidateStep(int stepIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | stepIndex | The zero-based index of the step to validate. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
Remarks
- Game Profile (1): requires a Scylla.Core.ScyllaBootstrap in the scene and a non-empty profile selection.
- Input Actions (2): for "existing" choice, requires a non-null UnityEngine.InputSystem.InputActionAsset assignment; for other choices, requires a non-empty choice string.
- Input Contexts (3): requires a non-empty context choice.
- Binding (5): when rebinding is enabled and JSON storage is selected, requires a non-whitespace storage folder path.
- Output (7): requires a non-empty output folder starting with "Assets/", non-empty config names, and (when creating a new asset) a non-whitespace action asset name.
- All other steps: always valid.