为什么在Ubuntu上,VS Code对Unity的智能感知不起作用?

huangapple go评论69阅读模式
英文:

Why VS Code intellisence for Unity is not working in Ubuntu?

问题

I'm having a problem with intellisense on vs code for Unity on Ubuntu 22.04. I have a lot of extensions for vs code so that may be the problem.

I tried to open a file in Unity for vs code. Using external tools setting. It worked but I want to have intellisense too.

英文:

I'm having a problem with intellisense on vs code for Unity on Ubuntu 22.04. I have a lot of extensions for vs code so that may be the problem.

I tried to open a file in Unity for vs code. Using external tools setting. It worked but I want to have intellisense too.

答案1

得分: 0

通常情况下,这不应该依赖于您已安装的任何其他扩展。您能否查看以下检查清单,并确认一切都已正确设置?

VSCode Unity 3D工作智能感知检查清单:

  • 在您的计算机上安装了Mono Framework.net SDK
  • 确保在Unity3D中,外部编辑器设置为“Visual Studio Code”,如果需要,按下重新生成项目文件
  • 在VSCode中安装了C#扩展
  • 在项目设置或全局设置中,确保omnisharp.useModernNet已禁用
  • 检查您的VSCode设置中omnisharp.monoPathmono路径是否正确
  • 打开解决方案时,请确保OmniSharp服务器正在运行

进一步调试

  • 检查Visual Studio中OmniSharp/C#控制台的输出并查看错误消息。

  • 在C#扩展的版本v1.25.2中存在一个问题,涉及到Mono路径。到目前为止,我在v1.25.0中运行得很顺利。


希望这能帮助您找到您计算机上的问题。 😅

英文:

Normally this shouldn't depend on any other extension you have installed. Could you go through following checklist and confirm everything is setup correctly?

VSCode Unity 3D working IntelliSense checklist:

  • Have the Mono Framework and .net SDK installed on your machine
  • Make sure in Unity3D the external Editor is set to "Visual Studio Code" and press regenerated project files if nessacary
  • Have the C# extensions installed in VSCode
  • Either in the project settings or globally have omnisharp.useModernNet disabled
  • Check if the Path to mono is correct in your VSCode setting for omnisharp.monoPath
  • Ensure the OmniSharp Server is running when you open up the Solution

Further debugging

  • Check the Output of your OmniSharp/C# Console in Visual Studio and check the error messages.

  • There is a bug in the C# extension in Version v1.25.2 with Mono Path. I can work with v1.25.0 very fine so far.


I hope this helps you to find the issue on your machine. 😅

huangapple
  • 本文由 发表于 2023年4月13日 20:40:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/76005550.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定