gpt4 book ai didi

c# - 标识符不在范围内 [Unity, VS2019]

转载 作者:行者123 更新时间:2023-12-04 20:33:14 33 4
gpt4 key购买 nike

我最近切换到 Visual Studio 2019 (之前为 2017 年)以及 Unity 2019.1.3f1 (以前 ~2019.1.0 的东西),新的 Tools for Unity在 Visual Studio 中,我偶然发现了一个问题。

当我调试时,我看不到我的 Singleton 类中的变量(例如, GameManager.Instance.Var, Instance is public static )。如果我尝试通过立即窗口查看它,它会给我以下信息:
The identifier 'GameManager' is not in the scope
将鼠标悬停在它的任何部分(GameManager、Instance、Var)上根本不提供任何信息,CodeLens 无法使用它。

糟透了,因为现在我无法正常调试,只有Debug.Log哈哈...

帮助!我能做什么?好像找不到类似的问题。

这是我对 Tools for Unity 的设置的图片:

enter image description here

谢谢!

最佳答案

所以,我想通了,这是一个 Visual Studio 2019 错误,我已将其报告给 Microsoft,他们将修复它。
这是问题的链接:
https://developercommunity.visualstudio.com/content/problem/581763/unity-development-in-visual-studio-2019.html

关于c# - 标识符不在范围内 [Unity, VS2019],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56282608/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com