Visual studio code auto-complete

后端 未结 9 2259
遥遥无期
遥遥无期 2021-02-13 03:30

I have just downloaded unity and saw that now it supports Visual studio code, I downloaded it and made it the default editor.

After trying to edit a script, it prompted

9条回答
  •  说谎
    说谎 (楼主)
    2021-02-13 03:59

    Intellisense (Autocompletion) is a pure workflow of .Net Environment. So, you need to have .Net 'Developer pack' (not Runtime) installed on your system as it installs all three necessary components below:

    1. .Net framework
    2. .Net Target pack
    3. .net SDK

    reference link: https://dotnet.microsoft.com/download/visual-studio-sdks

    It is directly installed to a system admin-accessible path, so no need setting it up. Now, you have to tell VS Code which .Net version to use (whichever you have installed). Your Unity project will have these two files in the root directory:

    1. Assembly-CSharp.cs
    2. Assembly-CSharp-Editor.cs

    In these both files search for line (probably 16):

    v4.8
    

    Edit version that you had just installed (I had 4.8). Then reopen VS Code. Now everything should work fine.

提交回复
热议问题