Namespaces just not working at all?

I’ve made it all the way through the 2D course and up to this point in the 3D course with virtually no hiccups but now all of a sudden I can’t use any namespaces in visual studio and I’m completely fooled as to what is going wrong. Below is a few screenshots of what I have going on and maybe the answer is right in front of my face and I’m just overthinking it.

First thing that happened is the UnityStandardsAssets namespace just stopped working for me. And then the more I tried to problem solve I realized that none of the namespaces were working as you can see in this first picture the Time.Deltatime isn’t even being recognized.

Second thing you’ll see is I did some digging around in the files and there is the file that is a Visual Studio Solution. I had no idea what this was so I opened it up to find that it was just my code but in the proper working format. As you can see all namespaces are working correctly. The problem is when I’m working on my code or a new script in unity it opens up in visual studio and is immediately not working properly just like in the first picture. I have had literally 0 issues up until this point and have no clue what magic button I pressed to do the damage but I’ve not been able to figure this out at all someone help!


Before anyone asks I have reimported any assets such as the standard assets that we’ve been using, uninstalled and reinstalled both unity and visual studio still nothing works.

On a side note when this problem started I started getting this notification in the console (“The editor layout could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project”)
It wasn’t an error or warning it was just printed in. Idk what started this mess but someone please help!

1 Like

Well just in case anyone happens to run into the same problem and doesn’t want to bash their head into the keyboard all night trying to figure it out I have fixed the problem.

I updated to the latest official Unity release which at the time is 2019.2.18f1 and also to Visual Studio 2019. Doing this made Unity lose sync with Visual Studio so even though the scripts opened with Visual Studio they weren’t linked to my Unity project and therefore wasn’t using the Unity namespaces.

To Fix the problem, in Unity go to Edit>Preferences>External Tools>External Script Editor and select the coding program (in my case it was now Visual Studio 2019).

Spent all night trying to install, reinstall, code checks, you name it I did it. In the end it was a simple drop-down menu that caused all of my problems! Hopefully if anyone has the same issue this saves someones life!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms