c# - 如何在 Visual Studio Code for Unity 函数名称中获取智能感知?

标签 c# unity3d visual-studio-code intellisense

我正在学习有关 Unity 的教程,我看到讲师在编写方法名称时具有智能感知功能。

但是我只有类和变量的智能感知,我指的是 Unity 类,如 Rigidbody 和我自己的变量。

enter image description here

我还阅读了: Autocompletion not working in Visual studio

How to enable intellisense in Visual Studio 2017 for Unity

最佳答案

老问题,但我最近遇到了同样的问题。

您的 Assembly-CSharp.csprojproject-name.sln 文件中一定存在问题。最有可能是 .csproj 文件。如果您查看它,您会看到各种对 .dll 文件的引用。

您可以通过启用“编辑”>“首选项”>“生成所有 .csproj 文件”告诉 Unity(我的版本:v2019.2.20f1)为您创建这些文件。

 1. Delete both files.
 2. Enable .csproj file generation.
 3. Double click on a script in Unity.

这解决了我的问题。

关于c# - 如何在 Visual Studio Code for Unity 函数名称中获取智能感知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52189426/

相关文章:

javascript - RxJS 在浏览器中缺少运算符错误,但在 Visual Studio Code 中却没有

python - 已安装包但未导入包

c# - Datagrid 在滚动后选择了错误的行

c# - 在c#中只过滤excel文件

ios - presentViewController 使黑屏

c# 检查列表是否包含现有元素(不为空)

ios - iOS 上使用 Unity 5 的 Google Cardboard 视频纹理

C# 代码将使用 for 循环创建的文本框的值传递到另一个页面

c# - 与 System.Windows.Forms.Timer 的间隔不一致

node.js - 自定义 Node JS REPL 输入/输出流