Class ScyllaInputMenuItems
Defines Unity Editor menu items for creating and managing the ScyllaInput module, accessible from the top-level Scylla menu and from the GameObject context menu.
Inherited Members
Namespace: Scylla.Input.Editor
Assembly: ScyllaInput.Editor.dll
Syntax
public static class ScyllaInputMenuItems
Remarks
Both creation paths share the same underlying logic in CreateInputModule():
-
If no
ScyllaBootstrapexists in the scene, a dialog is shown and the operation is aborted. - If a ScyllaInput component already exists, a dialog is shown and the existing module object is selected instead.
-
Otherwise, a new child GameObject named after
ScyllaInput.Meta.NAMEis created under the bootstrap root, the ScyllaInput component is added, the operation is registered for undo, and the new object is selected.
Both menu items are validated so they are only enabled when a
ScyllaBootstrap is present and no ScyllaInput module exists yet.
Methods
CreateInputModule()
Creates a new ScyllaInput module GameObject as a direct child of the
ScyllaBootstrap object in the active scene, registers the creation for undo,
and selects the new object. Shows a dialog and aborts if the bootstrap is missing or
if an Input module already exists.
Declaration
[ScyllaMenuItem(ScyllaMenuGroup.Create, "Scylla Input", ModuleID = "ScyllaInput", Validate = "ValidateCreateInputModule")]
[ScyllaMenuItem(ScyllaMenuGroup.GameObject, "Scylla Input", ModuleID = "ScyllaInput", Validate = "ValidateCreateInputModule")]
public static void CreateInputModule()
OpenInputWizard()
Opens the Scylla Input Wizard for guided module setup.
Accessible via Tools > Scylla > Input > Input Wizard....
Declaration
[ScyllaMenuItem(ScyllaMenuGroup.Module, "Input/Input Wizard...", ModuleID = "ScyllaInput", Order = 0)]
public static void OpenInputWizard()
ValidateCreateInputModule()
Validator for the CreateInputModule() menu item. Returns
true (enabling the menu item) only when a ScyllaBootstrap
exists in the scene and no ScyllaInput component is present.
Declaration
public static bool ValidateCreateInputModule()
Returns
| Type | Description |
|---|---|
| bool | true if the menu item should be enabled; false to gray it out. |