Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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:

enter image description here

Thanks!

like image 900
stroibot Avatar asked May 23 '19 20:05

stroibot


Video Answer


1 Answers

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

like image 104
stroibot Avatar answered Nov 06 '22 21:11

stroibot