Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Context.canceled never true with touch inputs, even when I raise my finger/mouse

Discussion in 'Input System' started by SleepyWolfie, Aug 13, 2020.

  1. SleepyWolfie

    SleepyWolfie

    Joined:
    Jun 8, 2020
    Posts:
    28
    Hi there, thanks for reading this and to anyone responsible for the new Input System, congrats! Its an amazing tool.

    However, Im having a problem, and surely its something silly from my part. Seeing if anyone can help.

    For some reason, when I use my finger/mouse to receive input it registers the started and performed callbacks, but never the canceled one:

    The function:
    Code (CSharp):
    1. public void OnBeginDashInput(InputAction.CallbackContext context)
    2.     {
    3.         if (context.started)
    4.         {
    5.             Debug.Log("Started: " + context.started);
    6.         }
    7.         if (context.performed) {
    8.             Debug.Log("Performed: " + context.performed);
    9.         }
    10.         if (context.canceled) {
    11.             Debug.Log("Ended: " + context.canceled);
    12.         }
    13.     }
    Action map:
    upload_2020-8-13_18-2-50.png

    The events are wired up correctly, for they work fine.

    . Jolt Action 1.gif

    Any help would be appreciated and thanks in advance.
     
  2. blackelkgaming

    blackelkgaming

    Joined:
    Dec 15, 2019
    Posts:
    1
    I'm experiencing this issue as well and can't find a solution. Any chance you figured this one out?