Search Unity

Visual Studio not recognizing InputValue or InputSystem

Discussion in 'Code Editors & IDEs' started by Marscaleb, Sep 7, 2020.

Thread Status:
Not open for further replies.
  1. Marscaleb

    Marscaleb

    Joined:
    Jan 7, 2014
    Posts:
    1,037
    I'm writing my scripts for a new project. I just installed the new input system, but when I try to add the function "OnMove" Visual Studio draws a red line under "InputValue" because it doesn't recognize the type.
    I tried to add "using UnityEngine.InputSystem" to the top of the file but then it underlines InputSystem and says the namespace doesn't exist.
    I closed Visual Studio and re-opened it again but it still underlines it.

    What am I missing? What am I supposed to do to get Visual Studio to work with the Input System properly?
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,187
    upload_2020-9-7_19-9-32.png

    Make sure you have Input Systems installed through the package manager.
     
    palfrey_games likes this.
  3. Marscaleb

    Marscaleb

    Joined:
    Jan 7, 2014
    Posts:
    1,037
    It is, this is an issue with Visual Studio not realizing that I have it.
    The code compiled and everything; I just have Visual Studio squawking at me like I had an error.

    ...Or had, anyway. After opening up another script the issue went away. Strange that opening a new scripts solved the problem when resetting the program did not.
    Thanks for trying to help, at any rate.
     
    kingdom216 likes this.
  4. andromeda0209

    andromeda0209

    Joined:
    Sep 18, 2022
    Posts:
    1
    the same happens to me, can somebody help please?
     
  5. TheAILab

    TheAILab

    Joined:
    Aug 20, 2022
    Posts:
    2
    The same problem happened to me.
    Resolved by adding:
    using UnityEngine.InputSystem;
     
    NevTheOtter, Madjumper and Prummi like this.
  6. Maykill

    Maykill

    Joined:
    Aug 5, 2023
    Posts:
    1
    ur a chad, thanks
     
Thread Status:
Not open for further replies.