如何在 Visual Studio Code 中获取 Unity 函数名称的智能感知? [英] How to get intellisense in Visual Studio Code for Unity functions names?

查看:36
本文介绍了如何在 Visual Studio Code 中获取 Unity 函数名称的智能感知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am following a tutorial about Unity and I see that the instructor has intellisense when writes the method's name.

但是我只有类和变量的智能感知,我的意思是像刚体这样的 Unity 类和我自己的变量.

However I have only intellisense with classes and variables, I mean Unity classes like Rigidbody and my own variables.

我还阅读了:自动完成功能在 Visual Studio 中不起作用

如何在 Visual Studio 2017 中为统一

推荐答案

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

Old question, but I had the same problem just recently.

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

There must have been an issue in your Assembly-CSharp.csproj or project-name.sln files. Most likely to be the .csproj file. If you take a look at it, you will see various references to .dll files.

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

You can tell Unity (my version: v2019.2.20f1) to create these for you by enabling Edit > Preferences > Generate all .csproj files.

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

这解决了我的问题.

这篇关于如何在 Visual Studio Code 中获取 Unity 函数名称的智能感知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆