Input System, .cancelled callbacks not working

I can’t seem to get events to fire from .cancelled callbacks when I use the InputActions assets.


Imgur

This is the code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.Input;

public class TestMe : MonoBehaviour
{
    [SerializeField]
    private MyActions foo;

    [SerializeField] InputAction up;

    private void Awake()
    {
        foo = new MyActions();
        foo.Player.Wicked.performed += context => Debug.Log("performed, pressing 'space'");
        foo.Player.Wicked.cancelled += context => Debug.Log("cancelled, released 'space'");

        up.continuous = true;
        up.performed += context => Debug.Log("performed pressing 't'");
        up.cancelled += context => Debug.Log("cancelled, released 't'");

    }

    private void OnEnable()
    {
        foo.Enable();
        up.Enable();
    }

    private void OnDisable()
    {
        foo.Disable();
        up.Disable();
    }
}

But I can get .cancelled callbacks from InputActions that I assign in the inspector window.


Imgur


Imgur

I am using Unity 2019.1.1f1 and Input System package 0.2.8

Change “cancelled” to “canceled” and you should be right. There was a spelling change from International to US English.