简体   繁体   English

如何在 Linux/Ubuntu 上的 VSCode for Unity 中获得 C# 脚本的代码完成?

[英]How do i get code completion for C# scripts in VSCode for Unity on Linux/Ubuntu?

I recently came back to unity, as i found out that it does now support installation linux.我最近回到了统一,因为我发现它现在确实支持安装 linux。 It works, but when editing the scripts with vscode i do not get code completion.它可以工作,但是在使用 vscode 编辑脚本时,我没有完成代码。

I have installed the C# extension, the Debugger for unity extension and the Unity Code Snippets extension.我已经安装了 C# 扩展、用于统一扩展的调试器和统一代码片段扩展。

I know that there is the Visual Studio IntelliCode extension, but this does only support Java, Python js and ts.我知道有 Visual Studio IntelliCode 扩展,但这只支持 Java、Python js 和 ts。 I also know that there are IDEs that i can use, like Rider, but i would like to setup this in a lightweight environment without an IDE.我也知道我可以使用一些 IDE,比如 Rider,但我想在没有 IDE 的轻量级环境中设置它。

So, how do i setup code completion in vscode for unity-scripts on linux?那么,如何在 vscode 中为 linux 上的统一脚本设置代码完成?

Have you tried this guide你试过这个指南

  1. Install Unity Editor安装 Unity 编辑器
  2. Install Visual Studio Code 3.Tell Unity to use VSCode安装 Visual Studio Code 3. 告诉 Unity 使用 VSCode

n project preferences -> external tools you can tell Unity what program to use for editing c# scripts. n 项目首选项 -> 外部工具,您可以告诉 Unity 使用什么程序来编辑 c# 脚本。 If you have the Visual Studio Editor packages in your project, you should see a special “Visual Studio Code” option in your preferences.如果您的项目中有 Visual Studio Editor 包,您应该会在您的首选项中看到一个特殊的“Visual Studio Code”选项。 The packages are part of the standard Unity download now.这些包现在是标准 Unity 下载的一部分。

  1. Install dotnet安装点网
  2. Install mono-complete安装单完整

Most people forget step 3大多数人忘记了第 3 步

暂无
暂无

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

相关问题 如何在 VSCode (Linux Ubuntu) 中编译和运行 C# 代码? - How do I compile and run a C# code in VSCode (Linux Ubuntu)? 加载统一 C# 脚本时,如何修复 VSCode 中的 IntelliSense 不起作用和 OmniSharp 错误消息? - How do I to fix IntelliSense in VSCode not working and OmniSharp error messages when loading unity C# scripts? Unity C# 脚本在 Vs Code 中编辑时,不提供自动补全 - Unity C# scripts when edited in Vs Code, do not offer auto completion 如何让 C# Dotnet Intellisense 在 Ubuntu 上使用 Visual Studio Code - How do I get C# Dotnet Intellisense to work on Visual Studio Code on Ubuntu 如何使用字典使 C# 中的代码整洁,用于统一脚本 - how to use dictionary to make code tidy in C# for unity scripts 如何使用C#在Unity中的两个脚本之间访问更新的变量? - How do I access an updated variable between two scripts in Unity with C#? 如何在 Unity 2d C# 中的脚本之间传递变量 - How do I pass a variable between scripts in Unity 2d C# 如何修复 Visual Studio 将 C# Unity 脚本视为杂项,因此无法自动完成? - How do I fix Visual Studio Treating C# Unity Scripts as Miscellaneous, and thus not autocompleting? 无法在Unity3D内部的C#编码脚本中实例化byte []数组; 我该如何解决? - Cannot Instantiate byte[] array in C# coding scripts inside Unity3D; How do I fix that? 如何在另一个脚本if语句中使用移动输入结果? C#Unity - How do I use my mobile input results in another scripts if statement? C# Unity
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM