Search Unity

Question The "old" Input manager makes weid errors !!!

Discussion in '2D' started by soerenj42, Mar 2, 2021.

  1. soerenj42

    soerenj42

    Joined:
    Aug 2, 2020
    Posts:
    3
    Hi,

    I have a problem with INPUT MANAGER (the "old" one)! I wanted to play with the new input, and since then some weird messages:
    "
    InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    UnityEngine.Input.GetKey (UnityEngine.KeyCode key) (at <18652b5914b14e07a74076a4608f13e3>:0)
    PlayerMove.PlayerMoveKeyboard () (at Assets/Scripts/PlayerMove.cs:194)
    PlayerMove.Update () (at Assets/Scripts/PlayerMove.cs:40)"

    and it don't work.


    private void PlayerMoveKeyboard()
    {
    if(Input.GetKey(KeyCode.Space))
    {
    Debug.Log("Shoot!");
    }
    }

    I've have tried to "KetCode.Space" with other key.

    Regard
    Soeren
     
  2. soerenj42

    soerenj42

    Joined:
    Aug 2, 2020
    Posts:
    3
    Hi again,

    Or this one:
    "ArgumentException: Input Key named: W is unknown
    UnityEngine.Input.GetKeyDown (System.String name) (at <18652b5914b14e07a74076a4608f13e3>:0)
    PlayerCon.Update () (at Assets/Scripts/PlayerCon.cs:19)"