Table of Contents

Class InputSettingsService

Namespace
Koala.Simulation.Input
Assembly
Koala.Simulation.dll

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.

public static class InputSettingsService

Examples

Example: Saving and loading overrides manually

// Save current bindings
InputSettingsService.SaveOverrides(myActionAsset);

// Load bindings on startup
InputSettingsService.LoadOverrides(myActionAsset);

// Reset all bindings to defaults
InputSettingsService.ClearOverrides(myActionAsset);

Methods

Name Declaration Description
ClearOverrides(InputActionAsset) public static void ClearOverrides(InputActionAsset asset)

Clears all binding overrides from the given action asset and deletes saved data. Automatically invalidates the InputManager cache.

LoadOverrides(InputActionAsset) public static void LoadOverrides(InputActionAsset asset)

Loads binding overrides from the save file into the given action asset. Automatically invalidates the InputManager cache.

SaveOverrides(InputActionAsset) public static void SaveOverrides(InputActionAsset asset)

Saves all binding overrides from the given action asset into the save file. Automatically invalidates the InputManager cache.