【发布时间】:2021-10-03 02:01:59
【问题描述】:
当尝试从 Unity 包(特别是 InputSystem)引用一个类时,VSCode 会给我错误 The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?) [Assembly-CSharp],即使 Unity 构建和运行都很好,没有任何抱怨,并为 Visual Studio 生成项目文件正常工作。
这开始于我尝试从 Visual Studio 迁移到 VSCode 作为我的主编辑器,因此该过程中的某些东西可能会破坏它们。我尝试了很多不同的方法 - 删除和重新生成 .csproj 和 .sln 文件,卸载、重新安装和更新软件包,甚至删除整个 repo 并重新克隆,但没有解决问题。
【问题讨论】:
标签: c# visual-studio unity3d visual-studio-code compiler-errors