VSCode Unity 插件
2023/10
21
09:10
微软官方出品,满分推荐,好用
安装条件:
- Unity2019及更高版本
- .NET 7 SDK及更高版本
- Uniy的PackageManager中,安装Visual Studio Editor 2.0.20及更高版本,把Visual Studio Code Editor卸载掉!
- VSCode中激活了 C# Dev Kit 插件
其它配置:
- 在Unity中,Edit/Preferences/External Tools/中,External Script Editor选择Visual Studio Code,然后点Regenerate project files
然后在Project中,右击选择Open C# Project,打开VSCode,即可。
各种代码提示生效。
若要调试Unity,可以在.vscode/launch.json中,添加Attach to Unity配置
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}
然后在VSCode中,摁Ctrl+Shift+P,选择Attach Unity Debugger,即可连接调试
CopyRights: The Post by BY-NC-SA For Authorization,Original If Not Noted,Reprint Please Indicate From 老刘@开发笔记
Post Link: VSCode Unity 插件
Post Link: VSCode Unity 插件