A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Code Editors & IDEs' started by DavidG_Fenex, Feb 27, 2020.
Thank you so much...
Thank you!!! Worked exactly like you said.
you are my actual hero, thank you so much for posting this solution for everyone to use
Thanks, This helped me a lot.
This helps for Unity classes, but if you'd also like full IntelliSense information for standard non-Unity C# classes, see this thread.
Many thanks xD
you are the one of real heroes . Thank you
Thank you so much!!! This was a perfect. Just for newer verisons you have to check every box and then hit regenerate Project files.
We've put together an article compiling all the issues that can cause IntelliSense to not work, as well as how to fix these issues, in this article here: https://blog.terresquall.com/2020/11/fixing-visual-studios-intellisense-autocomplete-in-unity/
If anyone trial all methods and if issue still exits let me share all the steps at once :
Method 1 : Change external editor to Visual Studio in Unity preference.
Method 2: Install Visual Studio using Unity hub/assistant.
Method 3: Update visual studio in Unity Package Manager
Method 4: Downgrade Visual studio version from package manager
Method 5: If all above steps got followed and not worked, create a new project and open a script from it in Visual studio.
Check if intelligence is working then open original project scripts and check. Intelli sense should work. In any case if it did not work then check Solution Explorer in Visual studio, you may see unsupported assembly. Just reload project from visual studio. It will the issue.
I hope it will helps .
It worked, Thank you so much!
thanks it worked
love you mane
worked like a charm thanks alot
[Another Thank You Here]!!
I might add that I had to go to "Open C# Project" for it to actually display the full directory on the right tab's "Solution Explorer". Then it asked me to allow Visual Studio Community through the firewall and after allowing, Intellisense began working as expected.
Much smoother than the ~6 hours spend trying to get VSCode to work.
Wanted to add there is another potential problem that can cause this, that I've not seen mentioned elsewhere and that is file path length limits ( at least on Windows ).
It would appear if any file path in the csproj file exceeds that limit ( approx 255 characters ) then Visual Studio can fail to find/load any of the references of the csproj. Without the references Visual Studio has no knowledge of Unity types and so intellisense breaks ( as well as other things ). The only warning you get for this is a tiny red stop symbol on the Solution and Projects in the solution Explorer and that if you explorer the references for a project in the explorer you'll see yellow exclamation triangle warnings.
Unfortunately with Unity's move to packages and embedding them within the projects Library/PackageCache folder you'll be surprised just how easy it is to hit that 255 character limit. For example
This path to a project is only 114 characters, and while rather silly with folder names, is not that uncommon a length. Looks fine doesn't it, no way that can cause a problem its under half the path limit!
Nope, because in this case project uses Entities package, which can result in a path in csproj reach 270 characters!
and this would appear to break Visual Studio without any useful warning.
So if you've exhausted all the other fixes, or perhaps before you even try them, it might be worth quickly checking the path length of your project, or better yet open up the .csproj files in a text editor and browse through looking for very long path names. There are online tools that can do character counts on text, so its simple to check any path names that look too long to see if they exceed approx 255 ( I'm not sure the exact character limit, it might be a few less )
Reading up on long file paths it may be solvable from Unity's end if they encoded pathnames using the extended-length path, use the "\\?\" prefix, though my understanding is that Visual Studio would have to support using unicode versions of IO API.
Alternatively Win 10 and above can be set to support long path names via regedit, though that solution is machine specific so maybe not as useful.
how can i try that ?
I am running out of things to try
It just works, thank you)
Can't tell you how many times I've used this. Maybe one day I'll remember where to find the menu options, but it's not intuitive. Thanks!!
Thanks a ton, it worked even on Unity 2020 LTS and Visual Studio Community 2022. They really need to fix this issue.
You need to be able to replicate a bug to be able to fix it. Some people have the bug happen every once in a long while, some people have it happen frequently, and some people like myself have never seen the bug in our entire history of using Unity. I've used VS, VS Code, and Rider, and only VS Code has done it. It's really weird.
thanks god F*** the mono, i was struggling about my fcking .csproj not loaded and found out that I didn't download mono framework
always remember get everything u need before starting ur project!!!
I having a problem regarding all the fixes above. Intellisense won't work for other stuff than keywords, while I got everything checked to be normal. Anyone with an idea? (Using visual studio community).
All text is white and compiler works fine.
seems like the latest version of C# plugin for VScode doesn't work with .net 4.7.1
this fix worked for me: open vscode > click on extensions tab > c# > Uninstall dropdown arrow > Install another version > pick any version other than the newest one (I'm using 1.26.0 which seems to be stable)
If you are using the new Unity VSCode extension, you should NOT downgrade C# extension.
We have a dedicated thread here:
Thank you so much !
It was so annoying to see red errors everywhere on my unity .cs files inside Visual Studio.
It seems that the error appeared after my Unity Project had to reimport all assets, following the install of an Unity package.
My setup :
- Microsoft Visual Studio Community 2022 (64 bits) - Version 17.7.4
- Unity 2022.3.10f1
Following your steps, I found a slightly simpler solution (assuming step 3 is properly setted) :
Step 1) close only one of all the files that got a similar issue inside Visual Studio, then close Visual Studio
Step 2) open the file you closed from Visual Studio, from Unity
Step 3 was already ok for me, and I didn't have to make any changes in Step 4: the first two boxes checked by default were fine.
Fix for Unity Intellisense Not Working in Visual Studio (Unity Tutorial) by Ketra Games (youtube channel)
This method works on Unity version 2022.3.7f1 with Microsoft Visual Studio version 17.7.6 as of today 2023OCT29.
I have an issue with intellisense but its not a case of it 'not working', it does work, but its not showing ALL of the commands/parameters/etc
i.e. if I start typing 'Physics' thats fine, but then I start typing .Ray and nothing shows up. I expect to see Raycast and other variants with help. So a bunch of commands are missing
Step 4 made it work
Thank you so much!
You're AMAZING. THANKS.