The identifier is not in the scope [Unity, VS2019]

大兔子大兔子 提交于 2020-04-10 18:47:07

问题


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.

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

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

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.

Here's a pic of my settings for Tools for Unity:

Thanks!


回答1:


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



来源:https://stackoverflow.com/questions/56282608/the-identifier-is-not-in-the-scope-unity-vs2019

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!