Disable Reset Enable makes controls being disabled forever

Hi @Rene-Damm !

Is this intended behaviour that if we do InputAction.Disable() (which is under the hood call DisableControls), then call InputAction.Reset() which changes state to InputActionPhase.Waiting but not touching controls, and then call InputAction.Enable() controls stays disabled, because Reset changes phase and Enable as result wont call EnableControls because it will do early out here
7547644--932782--upload_2021-10-5_13-11-24.png
7547644--932785--upload_2021-10-5_13-14-25.png

As result controls will be disabled forever until we again call Disable for setting a phase to InputActionPhase.Disabled and then can call Enable which will do the job and will enable controls.

At least we should have some error\warning about that, at best this case should be covered IMO :slight_smile:

Where do you see Reset going to Waiting?

We call Reset to Disabled here InputSystem/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs at develop · Unity-Technologies/InputSystem · GitHub

Well, you don’t :slight_smile:
7548109--932860--upload_2021-10-5_16-28-26.png

Reset calls state.ResetActionState with default value in toPhase which is Waiting

Check initial message please, I’m speaking about calling InputAction.Reset() after calling InputAction.Disable()

Simple reproduce case:
Get any InputAction, call Disable() (under the hood will also do DisableControls), call Reset() (which will change state to Waiting), call Enable() - Which will do nothing (look initial message)

Ah ok, I see, sorry it’s been a long day …
Yes seems to be broken, likely Reset should be a no-op if action is disabled

Would you mind to file a bug please?

Yeah, no problems, we did exactly that now :slight_smile:
7548172--932893--upload_2021-10-5_16-39-22.png

Sure I’ll fill bug report

@dmytro_at_unity FYI
Case 1370732

Thank you!

Thanks for reporting this problem. A PR with a fix targeted for our next patch release has been merged to ‘develop’ as of today: InputAction.Reset() will prevent action being re-enabled if in disabled state by ekcoh · Pull Request #1419 · Unity-Technologies/InputSystem · GitHub

According to the QA response in ticket - 1.2.0 should contain a fix, thanks!