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

Question UnityEngine.UI, InputSystem, TMPro, etc not found in namespace

Discussion in 'Editor & General Support' started by sharptoaster, May 16, 2022.

  1. sharptoaster

    sharptoaster

    Joined:
    May 16, 2022
    Posts:
    2
    Hello, ever since I've been using Unity, these 3 packages do not work in VScode, however they compile just fine in editor.

    The problem is no intellisense (so I'm kind of working blind) and hundreds of false errors.



    I've tried a ton of "fixes" including regenerating project files from the preferences tab, creating a new Assembly Definition file with those referenced in it, manually editing the packages/manafest.json file, etc.

    I'm spending a lot of time with input/UI now and would really like some assistance in getting these working.

    Thanks!


    EDIT: Oops, wrong account. How do I delete this so I may repost on my normal account?
     
    Last edited: May 16, 2022
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,964
    These are all in packages. If you don't have the packages, install them.

    If you do have the packages and Visual Studios is still being like this, this may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. sharptoaster

    sharptoaster

    Joined:
    May 16, 2022
    Posts:
    2
    Thanks for the post!

    To clarify, intellisense *did* work -- just not for those 3 specific packages.

    However, I simply tried updating VSCode within the package manager as you said and now everything works perfectly, thanks!

    I didn't even know it was in the package manager lol.