简体   繁体   English

即使统一构建,omnisharp 也找不到命名空间

[英]namespace can't be found by omnisharp even though unity builds

I am using vscode to edit unity scripts, I've added Mirror for needs, which extends its own namespace, but the problem is that omnisharp can't find it's namespace.我正在使用 vscode 编辑统一脚本,我已经添加了 Mirror for needs,它扩展了自己的命名空间,但问题是omnisharp 找不到它的命名空间。 All Mirror's files are under Assets/Thirdparty/Mirror所有 Mirror 的文件都在 Assets/Thirdparty/Mirror 下

Everything works in terms of compiling and the result, but I have no idea how omnisharp works and how to configure it.一切都在编译和结果方面起作用,但我不知道omnisharp是如何工作的以及如何配置它。

Below you can see waving lines at everything that is extended by the namespace.您可以在下面看到由命名空间扩展的所有内容处的波浪线。

文本

Sometimes I have that too, especially when I just updated VS Code or added a package in Unity.有时我也有这种情况,尤其是当我刚刚更新 VS Code 或在 Unity 中添加了 package 时。 And sometimes this helps:有时这会有所帮助: 在此处输入图像描述

Press the Regenerate project files button in Project Preferences .Project Preferences中的Regenerate project files按钮。

For me installing .NET Framework 4.7.1 Developer Pack fixed the problem.对我来说,安装 .NET Framework 4.7.1 Developer Pack 解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM