Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,366
    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:
    45
    Same problem, bumping
     
  5. Aionix

    Aionix

    Joined:
    Aug 31, 2018
    Posts:
    5