Search Unity

Bug Interaction not being canceled

Discussion in 'Input System' started by gurayg, Jan 17, 2023.

  1. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    Hi,

    I have a Button action that uses 2 interactions (Press interaction (Press and Release behavior) and a Hold interaction)

    Press is the top interaction in the list.
    Action closes a UI.

    When I trigger the action and cancel it by releasing the input.
    I see started and cancel Actions for Press interaction. I see my debug and UI closes as intended.
    If I re-open the UI before the hold interaction' "hold time" , UI closes on its own because Press and Release interaction' started action gets called.

    I'm confused. Isn't cancel supposed to cancel Press and Release interaction as well?
    This might be related to the fact that action deactivates a GameObject. And setting same GO active again might cause it. If that's the case. Is there a way to manually cancel an interaction of an action?

    Thanks