Odd question here. So my daughter and I are following along with a tutorial, trying to learn how to make custom editor windows and such. I realized that once my script was in the “Editor” folder I was told to make, all my using statements turn blue, and my IDE is no longer helping me with autocomplete and such.
Now, oddly, hers does not. We are running the same version of unity, our file structures are exactly the same and our code is identical (since we are following a specific tutorial after all).
Any ideas on where I could look for the problem, or what I could do to fix this?
Also, I just noticed if I move this script back out of the editor folder then code all works happily as it should, oddness…
This may help you with intellisense and possibly other Visual Studio integration problems:
Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.
Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.
Barring all that, move on to other ideas:
Also, try update the package inside of Unity: Window → Package Manager → Search for Visual Studio Editor → Press the Update button
Depending on flavor and version of Visual Studio, it may also have an installation step that you perform within the actual Visual Studio. This step seems finicky at best and may require multiple openings of VS before it comes up.
Update: The VSCode extension has been deprecated and abandoned:
Update: the VSCode integration is back… maybe!?
There may be a community fork available that is receiving updates.
Recently (July 2023) I worked on a Windows11 system that required a Microsoft component to be installed from within Visual Studio before it would work properly with all the OTHER software installed under Unity. I have no documentation on that process as I have only seen it once and it surprised me as well.
Thanks for the reply! Are the userprefs and vsconfig files in the unity install, project folder, or is it in the VS code folder? Just want to make sure I am nuking the right ones.