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.

Cannot find UnityEngine.InputSystem

Discussion in 'Input System' started by alkaitagi, Jan 11, 2020.

  1. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    I'm not sure if it's an issue with VSCode or Unity, but for some reason IDE can no longer see the whole
    UnityEngine.InputSystem
    namespace resulting in errors, though in Unity everything is fine and compiles. Neither Unity and InputSystem package nor VSCode and C# extension were updated recently.

    upload_2020-1-11_17-12-13.png
     
    KokodokoGames and nco2k like this.
  2. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    I've noticed that
    Cinemachine
    is missing as well. Of course the package is actually here and the game runs.
     
  3. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    I'd try clearing out your generated csproj and sln and reloading from unity. I've noticed rarely they can get out of sync in terms of what assemblies the IDE can see.
     
  4. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    Unfortunately this nor deleting library did not work. For every Unity package IDE prints
    Expected project reference c:\Users\alkaitagi\Projects\ProjectBurst\Unity.2D.Tilemap.Editor.csproj to be already loaded for project Assembly-CSharp
     
  5. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    Figured it out: Unity's VSCode package. Downgraded it from 1.1.4 to 1.1.2 and it works.
     
  6. nco2k

    nco2k

    Joined:
    Apr 30, 2018
    Posts:
    6
    i just upgraded to unity 2019.3.0f5 and the VSCode package 1.1.4, and now have the same problem. downgrading to 1.1.2 fixed the issue.
     
  7. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    @nco2k glad it helped. Downgrading to 1.1.3 works as well and might be a better solution.
     
    Brice-Joly likes this.
  8. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    85
    Setting "Generate all .csproj files" and pressing "Reset arguements" has solved the problem with 1.1.4.

    upload_2020-1-23_19-25-57.png
     
    Nacca-, elpko, CM_User and 26 others like this.
  9. nco2k

    nco2k

    Joined:
    Apr 30, 2018
    Posts:
    6
    i tried it again, but it didnt work for me. neither did 1.1.3. only 1.1.2 works for me. whatever the issue is, i hope they can fix it fast.
     
    danilofcestari likes this.
  10. bobbaluba

    bobbaluba

    Joined:
    Feb 27, 2013
    Posts:
    81
    For me it was solved by upgrading to 1.2.0
     
  11. yummi_Timmy

    yummi_Timmy

    Joined:
    Jul 20, 2020
    Posts:
    1
    I just suffered. For so long. Fighting this issue. And you just solved it for me.

    You don't know me, but we gonna make out. So hard.

    #bemahboyfriend

    #lolnahbutthanxthobro
     
  12. rohan_9

    rohan_9

    Joined:
    Aug 21, 2020
    Posts:
    1
    Install Input System from Package Manager
     
  13. Dediperri

    Dediperri

    Joined:
    Apr 4, 2017
    Posts:
    2
    Lol thx
     
    goorkamateusz and cdallaire like this.
  14. RabbitStudios

    RabbitStudios

    Joined:
    Jul 16, 2020
    Posts:
    1
    So, switch the mode of input system in Player settings to both, or old
     
    Cuddens and facejets like this.
  15. IspirationHappynes

    IspirationHappynes

    Joined:
    Feb 8, 2019
    Posts:
    46
    Hah, strange, for me that error appears only now:rolleyes:
     
    lukepend likes this.
  16. HummeL_AL

    HummeL_AL

    Joined:
    May 31, 2019
    Posts:
    8
    Haha, yeah! I`m here because this reason too
     
    IspirationHappynes likes this.
  17. lukepend

    lukepend

    Joined:
    Jun 29, 2019
    Posts:
    1
    I'm not sure if either of you are still having this problem, but I was able to fix this along with similar issues with VSCode intellisense complaining about not finding different packages in Unity 2019.4.16f1 by using alkaitagi's answer from above and adapting it to select the "Registry packages" option under "Generate .csproj files for:" before clicking "Regenerate project files". Doing this created extra csproj files for the different packages my project had installed and removed the errors VSCode was showing me.

    upload_2021-1-10_15-47-4.png
     
    candywr, TiamatSKK, skisc and 2 others like this.
  18. HummeL_AL

    HummeL_AL

    Joined:
    May 31, 2019
    Posts:
    8
    Yeah, I was fixed that next night. And... I`m just deleted .csproj file and then press "Regenerate .csproj files", idk how much this wrong, but it`s works for me. So... Thanks! )
     
  19. MortalKombatalie

    MortalKombatalie

    Joined:
    Dec 3, 2020
    Posts:
    1

    I just used this on Unity 20.1.13 and its worked.


    Thank you.
     
  20. PaulRdy

    PaulRdy

    Joined:
    Jun 26, 2015
    Posts:
    17
    If anyone is still having issues: Since we have an assembly definition for our project, we needed to add a reference to the Unity.InputSystem Assembly to the .asmdef file.
     
    iSinner, Alond, booferei and 3 others like this.
  21. magicink

    magicink

    Joined:
    Aug 31, 2014
    Posts:
    2
    This was exactly my issue.
     
  22. changstevenn

    changstevenn

    Joined:
    Jun 9, 2020
    Posts:
    2
    this helped !!! thanks alot
     
    Terminatorv700 likes this.
  23. jizuzkrist

    jizuzkrist

    Joined:
    May 5, 2021
    Posts:
    2
    [ Edit >> Preferences >> External Tools >> Regenerate Project Files ] Worked for me.
     
    trombonaut, c698746 and kgrax like this.
  24. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    add Unity.InputSystem Assembly into what .asmdef file? where? how?
     
    shesa likes this.
  25. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    I tried that earlier, but it did not work. some folks said (earlier in this thread) it did not work for them and they had to edit some .asmdef file
    upload_2021-8-24_15-30-31.png
    i tried it like this, and also with all boxes checked. still get namespace error.
     
    unity_TBHdlD-FkEPSTg likes this.
  26. RestlessSwords

    RestlessSwords

    Joined:
    May 9, 2021
    Posts:
    26
    GOT IT .... I removed input system package, re-imported it, then regenerated and now it finds the namespce !!
     
  27. kgrax

    kgrax

    Joined:
    Sep 4, 2021
    Posts:
    1
    This worked for me thanks!
     
    trombonaut and c698746 like this.
  28. HarryIsBeast

    HarryIsBeast

    Joined:
    Aug 25, 2015
    Posts:
    19
    Anyone that has this issue make sure you tick "Registry Packages" because InputSystem is from the unity registry so I assume that's what this box is referencing.

    Edit: also can't believe this issue is still happening
     
  29. TheColorman

    TheColorman

    Joined:
    Feb 22, 2021
    Posts:
    1
    On Unity 20.3.19f1, downgrading to Visual Studio Code Editor package V1.2.3 and hitting "Regenerate project files" while having every single one enabled worked for me.
     
  30. RandyWind

    RandyWind

    Joined:
    Jul 29, 2021
    Posts:
    3
    If you somehow use Assembly Definitions in your project! Check if you have add it to you Assembly References in your Assembly Definition Asset?
    upload_2021-9-30_23-40-2.png
     
  31. GrammerPancreas

    GrammerPancreas

    Joined:
    Feb 6, 2013
    Posts:
    1
    Regenerating Project Files and checking everything on top of it did nothing for me. I had to downgrade to 1.2.3 to get it to work. Annoying as hell.
     
  32. ageratum190

    ageratum190

    Joined:
    Oct 22, 2021
    Posts:
    1
    Contrary to this solution, I can only find InputSystem namespace when the "Registry Package" is not checked.
    My Unity is version 2020.3.12f. Input System is version 1.0.2 and VSCode Editor is version 1.2.4 I installed from package manager.
    What is the difference between my problem and yours?


    [EDIT]
    Sorry, my problem was solved after updating VSCode Editor to 1.2.3.
     
    Last edited: Oct 22, 2021
    efermerides and nerikara like this.
  33. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    234
    I also had this problem and solved it by "upgrading" to VS Code 1.2.3 and regenerating project files under 'Preferences'.
     
  34. MrJohnWeez

    MrJohnWeez

    Joined:
    Aug 31, 2013
    Posts:
    11
    This worked and if you cannot downgrade the VS Code Package within unity you can manually specify the versions in Packages/manifest.json and Packages/packages-lock.json. Make sure to update both to 1.2.3
     
  35. DrChocolate

    DrChocolate

    Joined:
    Feb 25, 2014
    Posts:
    1
    I also encountered this issue, downgraded the VS Code package to 1.2.3 (just edit the version number in `packages/manifest.json` and Unity will automatically update the lock file), regenerated project files, and the issue was fixed.
     
  36. sarahpuspdew

    sarahpuspdew

    Joined:
    Nov 7, 2021
    Posts:
    2
    do you have to add Assembly References too?
     
  37. King_of_L1mbs

    King_of_L1mbs

    Joined:
    Jun 15, 2019
    Posts:
    18
    "updating" VS Code package to 1.2.3 did the trick, while nothing else helped.
     
  38. Hellephant

    Hellephant

    Joined:
    Sep 30, 2021
    Posts:
    1
    Mine is pretty weird guys.. For some reason, I imported the Input system and it's working just normal on one Unity project. But when I made a copy, the copy wouldn't recognize the InputSystem at all. I've tried everything that was mentioned here. Deleting the Sln and assemblies and regenerating the files. I tried the assembly definition and put the Input system there on the folder I put my script in, and it didn't work. I tried restarting so many times. I tried creating a project from scratch from fresh new Unity file and import everything. Nothing. Nothing is working at all. But the original one still work no problem. How could it be??? Is there maybe a conflict between 2 Unity project files? Anybody else faces this problem at all?
     
  39. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    8,792
    Somehow for some reason it switched back to the old Input Manager? Maybe?
     
  40. Cartina

    Cartina

    Joined:
    Dec 30, 2012
    Posts:
    1
    Same here, been researching this issue back and forth and the only solution for me was to change
    Packages -> Manifest.json -> "com.unity.ide.vscode" to "1.2.3" instead of "1.2.4", then close vscode and regenerate project files and the red squiggly line is gone when I opened vscode again.
     
  41. blisz

    blisz

    Joined:
    Jun 23, 2020
    Posts:
    4
    This worked for me. Thanks!
     
    GenaritoBike and herbZzz like this.
  42. silentypeguy

    silentypeguy

    Joined:
    Jan 3, 2022
    Posts:
    1
    Almost total beginner here wading slowly through JMCad beginner tutorial . Many thanks to all on forum for time given over in these posts that helped me solve this particular problem in a few minutes. Much appreciated!
     
  43. Fernando-Ferreira

    Fernando-Ferreira

    Joined:
    Nov 9, 2015
    Posts:
    12
    Hi Guys, if you are using Unity 2022 and changing manifest.json doesn't work, just remove the "Engeenering" Feature in package manager and then Regenerate files and reopen vscode.

     
  44. danielmanzie87

    danielmanzie87

    Joined:
    Dec 4, 2020
    Posts:
    5
    After reading this ENTIRE forum, I simple updated Visual Studio Code Editor to 1.2.4, went to preferences > external Tools> and hit regenerate project file. And my problem was solved. using unityEngine.InputSystem now works!
     
  45. prasannasworld

    prasannasworld

    Joined:
    Dec 6, 2021
    Posts:
    1
    Bro Thank u so much,it works.
     
  46. wes4ray

    wes4ray

    Joined:
    Feb 25, 2022
    Posts:
    1
    so i tried everything above With no luck, so i opened """Visual Studio""" for the First time((((Not VS Code)))) and what do you know my VS Code is now Working! just in case you made it this far here is my fix, i guess i just need to open it up and close it down
     
  47. PadjokeJ

    PadjokeJ

    Joined:
    Oct 13, 2020
    Posts:
    2
    Just regenerating .csproj files worked for me!
     
  48. c698746

    c698746

    Joined:
    May 3, 2018
    Posts:
    1
    Is available
     
  49. sael-you

    sael-you

    Joined:
    Dec 5, 2020
    Posts:
    5
    THANK YOOOU!
     
  50. Lokesh2022

    Lokesh2022

    Joined:
    May 8, 2021
    Posts:
    9
    its working. thanks you save my time