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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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:
    1,905
    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