Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

VS Code Setup for Unity

Discussion in 'Editor & General Support' started by thecanadianguy543, Oct 19, 2021.

  1. thecanadianguy543

    thecanadianguy543

    Joined:
    Mar 25, 2021
    Posts:
    2
    I have been wrestling with how Unity interacts with VS Code, with out much luck.

    When opening a C# script, Unity opens the entire project in VS Code, causing extreme lag and multiple warnings. Is there a way to configure it to only open the selected script? I don't want to load all the assets in VS Code...

    Does anybody have experience with this?
     
  2. I think you need to uninstall the vscode package from the package manager and set up vscode as an external editor to do that.

    Disclaimer: I haven't used vscode for years at this point, I may be wrong.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    Keep wrestling... you can overcome it, it just takes some fiddling.

    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.

    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