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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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:
    992
    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,144
    upload_2020-9-7_19-9-32.png

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

    Marscaleb

    Joined:
    Jan 7, 2014
    Posts:
    992
    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:
    1
    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.