Search Unity

Bug "Cannot find Action Map 'Player' in actions '...inputactionasset'

Discussion in 'Input System' started by halley, Nov 23, 2022.

  1. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,437
    I renamed the default player map from 'Player' to 'Walking' in my inputactionasset.
    I double-checked that the PlayerInput instance knew the new name, and the Inspector showed it switched automatically to 'Walking'.

    I start Play, and the keyboard responds correctly but the mouse fails to have any effect, and the console shows:

    Cannot find action map 'Player' in actions 'GenericPlayerInputs (UnityEngine.InputSystem.InputActionAsset)'
    UnityEngine.InputSystem.PlayerInput:OnEnable () (at Library/PackageCache/com.unity.inputsystem@1.4.4/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1619)

    The source code line in PlayerInput does not obviously have a reference to the old name 'Player'.

    Code (CSharp):
    1.             using (InputActionRebindingExtensions.DeferBindingResolution())
    2.             {
    3.                 AssignPlayerIndex();
    4.                 InitializeActions();
    5.                 AssignUserAndDevices();
    6.                 ActivateInput();       << line 1619
    7.             }
    8.  
    If I rename the action map back to 'Player' everything works again.
     
  2. charlego

    charlego

    Joined:
    Apr 9, 2020
    Posts:
    1
    I have the same issue. Has anyone a solution.
     
  3. etekmen13

    etekmen13

    Joined:
    Dec 2, 2017
    Posts:
    3
    Same problem, bumping
     
  4. twell59

    twell59

    Joined:
    Feb 6, 2016
    Posts:
    47
    Same problem, bumping
     
  5. Aionix

    Aionix

    Joined:
    Aug 31, 2018
    Posts:
    5
    jakesee likes this.
  6. jakesee

    jakesee

    Joined:
    Jan 7, 2020
    Posts:
    76
    The solution is to go to the PlayerInput component, change the default map, save, change it back again. This refreshes the Editor internals.