标识符不在范围内[Unity,VS2019] [英] The identifier is not in the scope [Unity, VS2019]

查看:337
本文介绍了标识符不在范围内[Unity,VS2019]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近已将Visual Studio 2019(以前是2017年)和Unity 2019.1.3f1(以前是〜2019.1.0之类)一起切换到Visual Studio中的新Tools for Unity,并且偶然发现了一个问题.

I've recently switched to the Visual Studio 2019 (previously 2017) along with Unity 2019.1.3f1 (previously ~2019.1.0 something), with new Tools for Unity in Visual Studio and I have stumbled upon a problem.

在调试时,看不到我的Singleton类中的变量(例如GameManager.Instance.Var,实例为public static).如果我尝试通过即时窗口"查看它,它将为我提供:

When I am debugging, I can't see the variable from my Singleton class (e.g., GameManager.Instance.Var, Instance is public static). If I try to see it through Immediate Window it gives me this:

The identifier 'GameManager' is not in the scope

将鼠标悬停在它的任何部分(GameManager,Instance,Var)上都无法提供任何信息,CodeLens则无法使用它.

Hovering over any part of it (GameManager, Instance, Var) doesn't give any info at all, CodeLens is not working with it.

很烂,因为现在我无法正确调试,只有Debug.Log大声笑...

It sucks, because now I can't debug properly, only Debug.Log lol...

帮助!我能做些什么?看来我找不到任何类似的问题.

Help! What can I do? It seems that I can't find any similiar issues.

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

谢谢!

推荐答案

所以,我弄清楚了,这是Visual Studio 2019错误,我已经向Microsoft报告了此错误,他们将对其进行修复. 这是问题的链接: https://developercommunity.visualstudio.com/content/problem/581763/unity-development-in-visual-studio-2019.html

So, I figured it out, it was a Visual Studio 2019 bug, I've reported it to the Microsoft, they are going to fix it. Here's the link to the problem: https://developercommunity.visualstudio.com/content/problem/581763/unity-development-in-visual-studio-2019.html

这篇关于标识符不在范围内[Unity,VS2019]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆