Search Unity

Intellisense not working for specific packages

Discussion in 'Linux' started by Domarius, Apr 28, 2020.

  1. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    103
    After following all instructions, VS Code seems to work great, intellisense, and breakpoints work...

    But specifically for these packages, VS Code gives a red underline, saying "The type or namespace does not exist"
    • UnityEngine.AddressableAssets
    • UnityEngine.InputSystem
    Unity, however, runs the project fine and does not show any errors. It's all otherwise fine except I'm not getting intellisense suggestions as I type for just those specific namespaces, which really slows things down when trying to learn about these packages. I keep referring to the API documentation, which gets me by fine, but is there any idea why intellisense isn't working for just these specific namespaces?

    Side note:
    VS Code is also complaining about not finding .NET Core, not sure if that's related? I don't care otherwise. I'm using Manjaro, not Ubuntu, so the default install instructions don't apply. I installed .NET Core via snap but the error pop-up continues. I believe VS Code still can't find .NET Core on the path.
     
    Last edited: Apr 28, 2020
  2. Domarius

    Domarius

    Joined:
    Jan 5, 2013
    Posts:
    103
    I fixed this - some common advice is; from the Unity Editor, click "Assets, Open C# Project". This didn't work for me right away, even closing VS Code first. I noticed VS Code would open up my previous project anyway. So; I closed everything in VS Code - any open projects, folders, or files, so it's just the default welcome screen. Then I closed VS Code. So that it would open up at the welcome screen next time.

    This time, with VS Code closed, when doing "Open C# Project" from Unity, it was very different - VS Code started downloading some packages. And intellisense didn't work right away, but it eventually did as I worked, probably building the intellisense cache in the background.