Table of Contents

Namespace Koala.Simulation.Input

Classes

InputManager

Centralized input system built on Unity's new Input System.

Provides event-based access to all input actions, automatic handling of action maps, and support for runtime map switching with stack semantics.

Key features:

  • Subscribe/unsubscribe to any action by name
  • Global OnAnyActionStarted event for catching all input started phase
  • Global OnAnyActionPhase event for catching all input phase (started, performed, canceled)
  • Switch, push, and pop between multiple action maps
  • Notifies when the active action map changes
  • Integrates with InputSettingsService for binding overrides

Access this class directly via InputManager. Requires SimulationManager to be present in the scene. Only one instance of SimulationManager should exist.

InputRebindService

Provides utility methods for rebinding input actions at runtime.

Wraps Unity's InputAction.PerformInteractiveRebinding API and integrates with InputSettingsService to automatically save binding overrides into the simulation's save system.

Key features:

  • Start an interactive rebind for any action and binding index
  • Automatically saves and restores overrides
  • Provides display strings for showing current bindings in UI

Commonly used from UI buttons or settings menus to allow players to customize their controls.

InputSettingsService

Handles saving, loading, and clearing of input binding overrides.

Works with Unity's new Input System to persist user key rebinding changes into the simulation's save file (world.es3) using Easy Save (ES3).

Key features:

  • Saves all current binding overrides as JSON
  • Loads and applies saved overrides at startup
  • Clears overrides and resets to default bindings
  • Automatically invalidates the InputManager cache

This service is called internally by InputRebindService, but can also be used directly if needed.

InputSpriteAsset

A collection of SpriteEntry objects.

Structs

SpriteEntry