Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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:
    774
    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:
    774
    Thank you @MlleBun I updated unity and now it works as expected