Unity Modular Inputs with ScriptableObjects
Managing inputs in Unity can quickly become unwieldy, especially when dealing with multiple devices and input schemes. This guide explores a modular approach using ScriptableObjects to manage device-specific icons, decouple input events, and enable dependency injection for flexibility. Goals Ease of Management: Simplify handling device-specific input icons. Decoupling: Avoid relying on a centralized input manager. Flexibility: Use ScriptableObjects for modular and reusable input definitions. Drawbacks InputActionDefinition OnInput returns a CallbackContext that can have any information Subscribers have to assume the CallbackContext has the info they need (ex....