Search Unity

VS Code not working with Unity, no snippets

Discussion in 'Code Editors & IDEs' started by JerryWeii27, Apr 7, 2020.

  1. JerryWeii27

    JerryWeii27

    Joined:
    Feb 27, 2020
    Posts:
    48
    I am creating a game with Unity and I code with VS Code, however, there are no snippets. I remember there are snippets in visual studio (on windows, I am currently using mac). Is there something to install? Or some settings to change.

    Settings I changed is in the picture.
     

    Attached Files:

  2. JerryWeii27

    JerryWeii27

    Joined:
    Feb 27, 2020
    Posts:
    48
    Engine I am using: Unity 2019.3.4

    My problem:
    1. No intellisense when using VS Code
    2. Everything in the same color (almost everything)

    Things I have:
    1. dotnet
    2. Mono (i just download the pkg and installed it, nothing's changed)
    3. VS Code C# extension
    4. ......

    Everything is reinstalled TODAY, from the official websites. So don't tell me to update anything.
     
  3. JerryWeii27

    JerryWeii27

    Joined:
    Feb 27, 2020
    Posts:
    48
    Since no one post anything, I figured it out myself.
    Go to your project's folder. Find the Assembly C sharp.csproj and your [project-name].sln files, throw them out, restar t your project, go to preferences -> external tools -> select Visual Studio Code -> check create csproj files, and u r ready to use some intellisense.
     
  4. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Zaoto

    There are several threads discussing VS Code issues. I like it and use it, but when auto complete (usually) has stopped working, solution hasn't ever been the same for me... not happening currently, but seems like it has happened with some past versions.
     
  5. KorniXPL

    KorniXPL

    Joined:
    Nov 21, 2016
    Posts:
    11
    Can you tell me where you can find those files?
     
  6. JerryWeii27

    JerryWeii27

    Joined:
    Feb 27, 2020
    Posts:
    48
    Do you mean the [project-name].sln files?
    You can find them in your "projects" folder.
    Go to unity hub and go to this page. This is the path. Screen Shot 2020-08-06 at 2.40.21 PM.png
     
  7. Oderem

    Oderem

    Joined:
    Dec 15, 2019
    Posts:
    1
    Thanks sir, you helped me well!
     
  8. Onerimeuse2

    Onerimeuse2

    Joined:
    Apr 11, 2022
    Posts:
    1
    This worked, even two years later. Too bad old forums don't do upvotes, because this question is still being asked... lol
     
  9. maciejw94

    maciejw94

    Joined:
    Feb 11, 2022
    Posts:
    6
    for me disabling Omnisharp: use modern net in vscode setting worked. Also it takes like a minute on my pc for it to actually start wroking - i.e. for a minute or so the autocompletion doesnt work but then it's fine
     
    unity_qlApFOBYr5Ndxw likes this.
  10. awashcard

    awashcard

    Joined:
    Feb 12, 2023
    Posts:
    1
    I still can't find those files
     
  11. unity_57B5223D41E7240A824F

    unity_57B5223D41E7240A824F

    Joined:
    Mar 17, 2023
    Posts:
    1
    This work for me. Thanks man!
     
  12. DYJulian

    DYJulian

    Joined:
    May 18, 2022
    Posts:
    3
    I had a similar issue after installing some new 'Extensions' in VS Code.
    Before dig into further, I checked the Edit/Preferences/External Tools where we choose the External Script Editor.
    For some reason unknown, it was changed to 'code.cmd(internal)' so, I changed back to Visual Studio Code[1.81.1].
    And that was all I needed to back on business with VS Code.

    Unity Version: 2022.2.2f1

    upload_2023-8-15_13-19-33.png
     
    sailro likes this.