Search Unity

Question Who is this "Cancel [Any]" ?

Discussion in 'Input System' started by equal, Mar 28, 2023.

  1. equal

    equal

    Joined:
    Dec 14, 2012
    Posts:
    77
    Hi,

    i am converting to the new input system of Unity.
    I thought this would be straight forward but im facing a problem. Here i have the current InputMap

    upload_2023-3-28_11-16-18.png

    This is crystal clear. I have a UI Map -> Click Action -> Left Button (on Mouse)

    And here we have "Cancel [Any]", what does this mean?
    This currently would mean UI Map -> Cancel Action -> Cancel [on Anything]
    But i dont have a Cancel Key on the Keyboard.
    upload_2023-3-28_11-18-55.png

    My intuition tells me that this is most likly the Escape Button on the Keyboard, nothing on the Mouse and "B" on the Snes Controller, is this correct?


    My concrete questions:

    What is "Cancel [Any]" on "Any" of those devices ?

    How would i allow the User to remap input like "Cancel [Any]" ?

    Here is the scenario where i would like to replace the Input.GetKeyDown with an "Escape" Action -> caused by "Escape"-button on [Keyboard]
    Code (CSharp):
    1.   if (Input.GetKeyDown(KeyCode.Escape) && !isDragging)
    2.         {
    3.             EscapeMenuOnce();
    4.             GameManager.Inst.PlayerInfo.DebuggingMode = DebuggingMode.NONE;
    5.         }
    Is the ambigious "Cancel [Any]" the proper ActionButton what i am looking for?
    Any help is welcome!
     

    Attached Files: