【问题标题】:Unity VSCode autocomplete Intellisense not workingUnity VSCode自动完成智能感知不起作用
【发布时间】:2020-06-03 11:40:16
【问题描述】:

我已经下载了 VSCode 作为 Unity 的 IDE,包括扩展 unity Debugger 和 Unity code sn-ps。编辑器向我显示了诸如 awake() 或 start() 方法之类的建议,但没有显示 Rigidbody、transform 或 input 之类的变量。我该如何解决这个问题?

【问题讨论】:

标签: c# unity3d visual-studio-code


【解决方案1】:

我也遇到过同样的问题。只有切换到 Visual Studio(并下载 Unity 扩展)为我解决了这个问题。

我的同事首先也向我推荐了 Code,但最后我没有看到它的好处。

【讨论】:

    【解决方案2】:

    在 Unity 编辑 -> 首选项 -> 外部工具 -> 选择您的外部脚本编辑器

    还有问题吗?

    我在这里回答了一个类似的问题:

    Visual Studio Code error when using unity

    也在这里:

    How to get Visual Studio to recommend unity codes

    【讨论】:

      【解决方案3】:

      您只能在 VSCode 中安装一个 Unity 扩展。 unity3d-pack (1.0.0)

      这个包里面有10个包,所有的子包都对Unity编程很有用。

      C#
      C# FixFormat
      C# Snippets
      C# XML Documentation Comments
      Debugger for Unity
      Shader languages support
      Unity Code Snippets
      Unity Tools
      ShaderlabVSCode(Free)
      Code Outline
      

      【讨论】:

        猜你喜欢
        • 2022-06-17
        • 2021-06-19
        • 2015-08-27
        • 2015-08-27
        • 2018-06-01
        • 2023-02-02
        • 2022-07-28
        • 2020-11-22
        • 2021-11-18
        相关资源
        最近更新 更多