Search Unity

Unity events in PlayerInput have no parameters

Discussion in 'Input System' started by goldbug, Nov 10, 2019.

  1. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    768
    I added a PlayerInput to my character, created the default actions and set it to raise unity events:

    Screen Shot 2019-11-10 at 11.11.02 AM.png

    From the screenshot, it shows that Move() event has no parameters, I would expect either a `Vector2` or a
    `InputAction.CallbackContext` which means I cannot bind it to:

    Code (CSharp):
    1. public void OnMove(InputAction.CallbackContext context)
    2. {
    3.    ...
    4. }
    5.  
    For now I am forced to use SendMessage, but I would much rather use UnityEvents
     
  2. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
  3. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    768
    Thank you @MlleBun I updated unity and now it works as expected