1、 vscode安装插件
C# - Visual Studio Marketplace
C# Dev Kit - Visual Studio Marketplace
IntelliCode for C# Dev Kit - Visual Studio Marketplace
Unity - Visual Studio Marketplace
2、(如果已经安装 .NET,跳过这一步)手动安装 .NET 7.0,下载 .NET 7.0 SDK (v7.0.406) - Windows x64 Installer (microsoft.com)
3、Unity上确保 Visual Studio Editor package 已经更新到 2.0.20 以上版本。
4、一直Downloading the .NET Runtime. 修改设置 setting.json 添加如下
{
.....
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "visualstudiotoolsforunity.vstuc",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csdevkit",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
],
.....
}
网友评论