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.

Resolved Cannot find action on XInputController error

Discussion in 'Input System' started by FZ_Applications, Aug 5, 2020.

  1. FZ_Applications


    Jun 16, 2018
    I'm getting the following error on this line of code and can't figure out why:

    Code (CSharp):
    1. GetComponent<PlayerInputManager>().JoinPlayer(-1, -1, "Keyboard&Player");
    It says it can not find the controller's action but I don't even try to join player by gamepad (A gamepad is in deed connected)

    *Edit: I fixed it by switching the PlayerInputManager's behavior to "Send messages" instead of Unity Events, implemented this method
    public void OnMove(InputValue value) {}
    and it now works without any error.

    Cannot find action 'Player/MoveAxis[/XInputControllerWindows/leftStick]' with ID '53ca1077-7ceb-4d51-8d6a-e0a61f293aa2' in 'PlayerInputActions (UnityEngine.InputSystem.InputActionAsset)
    UnityEngine.InputSystem.PlayerInputManager:JoinPlayer(Int32, Int32, String, InputDevice)
    LocalMultiplayerManager:SpawnFirstPlayer() (at Assets/_Scripts/Game/LocalMultiplayerManager.cs:17)

    The odd thing is that the error says "action 'Cannot find action 'Player/MoveAxis...". And at this moment Player/MoveAxis was already deleted hours before.

    Attached Files:

    Last edited: Aug 5, 2020
  2. Rene-Damm


    Unity Technologies

    Sep 15, 2012
    The error about it not finding the action is annoying. However, it should not break things and input should otherwise function normally.

    ATM only the inspector for PlayerInput will clean up the list if there are action->event entries in there that have since become obsolete by the respective action having been deleted. We're currently looking for a better solution here.
    FZ_Applications likes this.
  3. FZ_Applications


    Jun 16, 2018
    Thanks for replying.
    You are correct, it did not break anything but error messages are very annoying.