简体   繁体   English

Visual Studio 智能感知/自动更正适用于 C# 术语,但不适用于 Unity

[英]Visual Studio intellisense/autocorrect works for C# terms, but not for Unity

When I write code in Visual Studio, it normally highlights and suggests prompts such as string , void , method names and such.当我在 Visual Studio 中编写代码时,它通常会突出显示并建议诸如stringvoid 、方法名称等提示。

However, it doesn't work for Unity terms such as Vector3 or Time .但是,它不适用于 Unity 术语,例如Vector3Time I tried updating both and also changing the external tools settings, but it doesn't seem to work.我尝试更新两者并更改外部工具设置,但它似乎不起作用。

What am I missing?我错过了什么? Thanks in advance.提前致谢。

You can try these steps:您可以尝试以下步骤:

Step 1: Close Visual Studio步骤 1:关闭 Visual Studio

Step 2: In Unity, go to Edit < Preferences < External Tools (left part of the Window)第 2 步:在 Unity 中,go 编辑 < 首选项 < 外部工具(窗口左侧)

Step 3: In External Tools go to the part that says External Script Editor (this should be on which ever Visual Studio editor you are using (for me it defaulted to "Open by File Extension"第 3 步:在外部工具 go 中显示外部脚本编辑器的部分(这应该在您使用的任何 Visual Studio 编辑器上(对我来说,它默认为“通过文件扩展名打开”

Step 4: Make sure Generate all csproj files is checked, and Editor Attaching is checked第 4 步:确保选中 Generate all csproj files,并选中 Editor Attaching

Step 5: Open the C# script you were trying to open earlier第 5 步:打开您之前尝试打开的 C# 脚本

(source: https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599 ) (来源: https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599

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

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