I was happy to notice that the new input system was supported since the last update.
Still I am struggling with it.
I can't manage to use the new input system with the dialogue system. I defined the scripting symbol USE_NEW_INPUT. I created and defined my actions, control schemes and bindings in an Input Actions Asset.
But I'm lost when in the input manual you say "you must register them with the Input Device Manager before calling any of the InputDeviceManager input query functions". Giving this example:
Code: Select all
void Awake()
{
controls = new MyControls();
}
void OnEnable()
{
controls.Enable();
InputDeviceManager.RegisterInputAction("Back", controls.Gameplay.Back);
InputDeviceManager.RegisterInputAction("Horizontal", controls.Gameplay.Horizontal);
}
void OnDisable()
{
controls.Disable();
InputDeviceManager.UnregisterInputAction("Back");
InputDeviceManager.UnregisterInputAction("Horizontal");
}
What is "MyControls()" exactly?
Should I create a script that register inputs in a similar way? When should I enable and disable it? Multiple controls schemes are all registered at once that way? Is there a way to treat control schemes differently?
Thanks.