Fix Visual Studio Code Unity IntelliSense AutoComplete (ACTUALLY Working Solution)
Vložit
- čas přidán 30. 09. 2020
- This has been bugging me for years. I finally sat down and settled things by staring Unity and vscode deep in its eyes. Also giving them blue eyes. Yes, I beat the living code out of software. It's a living. Good night.
- Věda a technologie
I love your voice. Like you have been let down by life and are just waiting for the void.
😂😂😂😂
i love him spitting in his mic every 2 seconds
"Why... Why... Why..."
Famous last words
this guys is so calm and angry at the same time
Hello!
One note for those who couldn't get it done with this exact method;
- After opening the C# Project from Assets drop-down menu, enable "output" on visual studio by clicking View > Output and see if you need a specific .NET developer package. In my instance, I needed 4.7.1 so after installing it, the issue resolved.
However, VS Code opens up 2 instances when i'm opening it for the first time using Assets>C# Project. One opens the general UI and the 2nd one opens the code itself. The one with the code still doesn't have intellisense but if i open the script on the first instance, intellisense works.
WHY is this so confusing, I have no idea.
Great Advice!! It worked perfectly for me, thanks a lot!!
Thank you!
Yes I did the same and it worked!
thanks!!
Literally took me 20 seconds after reading this comment to fix my problem after searching online for like 2 hours
Congrats man. Doing a better job then the docuentation writters from microsfot and Unity together.
Microsfot, XD
@@ratm4628 And docuentation :p
Thanks, it helped knowing I am not alone
Its my ffffffffffffff problem to 🤐
Fr fr they make this part seem so easy smh
Lol
i'm this close to punching a hole through my computer, intellisense wasn't working form the start but now Codelens also stopped working
Me too
I LOVE YOU. I’ve spent my whole day yesterday watching countless videos and this is the one that worked for me! Very simple tutorial and saved me a ton! I hope you know you’re appreciated!!!😭😭😭😭
Hello dear I am struggling to fix this issue. It's been a week but I couldn't. Can you please help me
@IPL Updates What do we do now?
Sorry I am (very) late but will this work for visual studio community 2019? I used it before my pc had to get fixed and it worked fine then but know it won’t tell me anything?
how can i get auto text like on visual studio community? in visual studio code it doesn't give me the whole line prediction like in communtiy
I opened my Unity editor for the first time last week after not doing so since 2017. I'm using the default VS 2017 Community Edition (not VS code) and trying your first example fixed my issue with Intellisense, or so I thought. It seems the C# API code now populates, but namespeaces do not. I needed to use a namespace (Using UnityEngine.InputSystem;) and it never worked. Any idea why? Thanks! =).
Thanks! All I had to do was make sure to set it to Visual Studio in Preferences instead of Open by file extension, then load a script from Unity, accept Windows security prompt and intellisense worked right away! I almost feel bad for only watching for 13 seconds, but this video helped me fix it that fast. You rock!
Whenever I try to do the the "open c# project" step, there is an issue saying some projects had some trouble loading can you please help with that
I had problems loading my project too. I found out I had the wrong dotnet version installed, and also I was missing a package. Try to check the output and filter for the omni sharp log. This way, I found out what was missing. Hope this helps.
i get a problem saying i need .NET SDK or somthing like that. then i download and do the stuff i have to do. it still gives me a pop-up saying that i need the .NET SDK or something, why is it saying this?
If you want to make a mod do you need a game making studio like Unity for example?
I get some error when download c# extension it tells that is have to download something
well.... i have a little problem. so when 2:06 and open it said "Git installation not found." can someone help?
You could install git but you don't need it
Unless you know that you need git.
I've been at it for an hour what the hell is this crap i cant get the intellisense still after installing everything suggested all over stack overflow
Received response for /v2/getcodeactions but could not find request.
Received response for /quickinfo but could not find request.
Sir can you please solve this error in vs code "this language server has crashed 5 times in 3 minutes. It can be restarted." Fix it
bro its not downloading for me its asking me for Sdk and still nothing happened
I have tried everything I followed and not even this helps it won't even autocomplete when I go to assets and open C# project. did someone else have this problem and and fixed it if so pls tell me how. this is btw like the 5th tutorial I have watched about this problem please help I want to jump of a cliff
Edit: I just noticed that the first time you opened through "open C# project" it downloaded something which did not happen to me, why -_-
Try to Restart OmniSharp from View > Command Palette
I went through more than 5 tutorials and yours was the only one that made it work. Opening through assets open c# project showed me the error. Thank you so much 😭😭😭.
So what does the unity debugger extension actually do?
I have a problem Refactoring option can't be found. I even checked the edit menu
im not exactly sure if people will still be here responding but it wont even show that the packages are downloading when i hit "open c# project" and it sadly won't autocorrect. i'm not sure what to do, ive looked in a bunch of places for the answer and this was the closest ive got. im fairly new to code and its a little frustrating so if someone could help that would be great
oh my god thank you so much! this helped me and its properly working now! :D it didnt take long, maybe some files were just messed up? i was checking through as i was reading your reply and it started autocorrecting
I feel your struggle, brother. Thanks, it now works. l really love editing in VSCode (compared to VS), but I really hate how poorly it interacts with Unity
buddy have you heard of text sublime before ?
@@khalifasaid2796 yes and f*** no
What schould I press to save I just dont get it
So apparently there's this option you have to disable in order to use it with Unity now.
In your settings look for; Omnisharp:UseModernNet
And set that thing to false, close Code, go to Unity and open it via Edit > Open C# Project.
Let it install as he did, and after that you're good to go. Even when opening scripts via double-click in future.
You're welcome.
This worked for me!
I thank you so much man you made my day
well mine doesn't have color (only white) no red underline for wrong code and don't have anykind of intellisense
It is the near end of 2023 and i STILL CANT GET INTELLISENSE WORKING. I’ve tried visual studio, i’ve tried visual studio code. NOTHING WORKS help me please
for some reason, unity hub does not set visual studio as the default editor when you install unity.
in your unity project open the menu: edit -> preferences -> external tools -> external Script Editor: (set this to your actual editor)
you need to change this for unity to show u the hidden project file setting for specify editor which then allow you to select 'generate project file' for the editor.
once this is added, you will have a project with the UnityEngine namespace in the solution explorer in visual studio.
I also had this problem today, and your fix wasn't working, but then i disabled the setting "Omnisharp: Use modern NET" on the C# Extension. Now i can open .cs files normally and intellisense starts working just fine.
it just says Attempted to update project that is not loaded:
Please reply to this it will help me a lot
Sir, When I type code in vscode suggestions result gives me suggestions of the word first and at a second-place, it gives suggestions of snippets. For example: if I write for then it gives suggestions for the "for" word. it doesn't give me a suggestion for the "for" snippet only so then I have to use the down arrow or click on snippet by mouse to print that snippet in the editor. But I want snippet suggestion first so that if I hit enter then that snippet should be written not just word.
How can i achieve this.
Did you try the TAB key?
First time coder and unity user here. It's very frustrating following tutorials when my C# Scripting doesn't work.
I see in all the videos, MonoBehaviour is in green, but mine isn't. When I type Input, or any other functions like GetKeyDown, IntelliSense doesn't read it. Everything used to work until I accidentally installed a newer version of Unity. I've uninstalled it and I THINK I got the same old version back, but now I can't even resume learning anything! Can anyone assist if they're able? Thanks!
This worked for me until just recently, not sure what's changed but now none of these solutions are working... :(
I stopped struggling with Vscode and moved to VS, it was just to irittating with Vscode intellisense was working ocassionally
Bruh, i was so mad at this issue that even thought maybe i gotta download the good'ol unity 5 ! But then your video made me feel not alone XD , im gonna try this way, fingers crossed...
I have windows 8 and its say you need .NET 4.7.2 or higher.
But latest supported .NET for windows 8 is 4.6 .....
Please Can Anyone Help ?
stop using vscode its trash. im going to uninstall.
@@fv4202x ... just google "No 1 Code Editor" LOL
Bro The Vs Code Not Show Me Any Errors Why ?
I love you! This issue was the reason I stopped using VS Code to begin with. Now I'm glad I looked this issue up to see that had been solved; and in a funny way to. :)
Java auto complete not working it's just shows like simple text but keywords and strings shows in different colours
1. Thanks for the tutorial
2. You made me laugh several times, love the way you did this tutorial
error omnisharp server load timed out??
After 2 hours of looking for the solution, your video finally helped me. Thank you so much!
It's a bit embarrassing but I literally cried half an hour ago bc I couldn't find a solution to this problem. Now it works. Thank you
Nah it’s perfectly understandable, this stuff is so stressful lmao
Thanks a million! I've been having this issue for YEARS!!! Whhyyyy, whyyy indeed. THANKS AGAIN!
bro this vid was 2 years ago and still works I actually love you
Aahah this video is so funny XD Every developer in their life has to fight with these things!
Finally a legit solution I was going crazy over this problem. Uninstalled and cleared all data sevral times but absolutely nothing happened. Doing the first steps in the video via external tools did the trick for me.
i like how inconvenient things happens and your reaction to it
ohhhhhhh my gawd i have benn trying to solve this problem for 2 days finally someone worth trying
earned a sub
Open with C# I get "Some projects have trouble loading." And it doesn't work.
**Fixed it. I had to install the correct .NET dev thingy (4.7.1).
Appreciate the video! You seriously inspired me to give it another go.
At first it didn't work, but then I thought, maybe its a me problem 🤷♂
To keep it brief, here is what I did:
1. uninstalled every VSCode extension
2. cleared my settings.json to an empty object
3. redownloaded C# and Prettier VSCode extensions
4. double clicked a new C# behavior file and triggered IntelliSense using CTRL + space (and it actually worked)
I've been working with Unity for months and only now have the pleasure of using this feature.
It's super worth getting this fixed because learning the Unity API without it is like walking through the jungle at night with no light. Sure you can RTFM, but this just makes that experience easier.
Oh god man you saved me, i reinstalled Unity and Visual several times and it wasnt working but i found your video and it was instantly fixed, thanks a lot
It worked!
I've downloaded so many extensions and non of them worked.. THIS worked! Thank you.
Fuck me this actually worked. For years, I've been looking for a way to do this for 3 years. Thank you sir.
If you've tried everything and it still doesn't work, then double check to be sure that you began typing your code in the right syntax. Also, go to settings and under "suggestions" uncheck and recheck the relevant things.
I hope this helps
I went through so many forums but couldn't find the issue, but this helped thanks a lot.💌
THANK YOU! I’m literally a noob to all of this and it’s frustrating that I have to do all of this stuff in the first place as I don’t understand what any of it means lmao. I just want to complete a unity tutorial 😭. Thanks again!
hey its been a month since you replied, are you still coding, if so are you better? i just wanna know because alot of people stop coding after a few weeks
still doesnt work for me..i did it as you
dude, i just love you. Thank you so much
this video is a whole mood ngl and I love it
Visual sutdio code isnt any better now tried all of these but it hasnt made a difference.
thank you so much this is so bugging ive been up all day 8 hours trying to figure it out and it turns out that you only need to open it in assets then open C# project
It's not installing anything 2:10 still not working
I'm using version 2021.3.7f1
didn't worked, what do I do?
Half the time mine wont immediately work is because of the "Output" windowthing (Ctrl Shift U) is still downloading and installing updates and until the "Finished" has appeared I have no expectations now.
my Output bottom side window tab thing shares same space as the "Terminal", "Problems" and "Debug Console" tabs:
"Downloading package '.NET Core Debugger (Windows / x64)' (45048 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (Windows / x64)'
Downloading package 'Razor Language Server (Windows / x64)' (60477 KB).................... Done!
Installing package 'Razor Language Server (Windows / x64)'
Finished"
bro i saw every celeb youtubers and didn't found the soln but with your video i found the solution thanks man!!
sadly this is actually not working. nothing gets downloaded when clicking on open C#-Project
worked for me!! thank you so much this was driving me crazy!!!
THIS NOT EVEN BC OF U BUT IT STARTED WORKING OMFG TY
Bro, you did a amazing job you helped me 2 times with this Video now! Thanks man!
I was planning to work on a parkour game but vs wont work i was extremely pissed unitil i saw this video. Thank you big brain boi :D
Bro i love you thanks xD. I searched so long
Really had a good laugh when you said "installed it poorly". Man, I just installed Win 11 fresh, installed VSC (works like a charm), installed Unity and it wasn't in the list. My install skills must be incredibly low 😛
Thank you my man 👍
God bless you now finally I can start again 😍
Hell, the whole Russian Internet doesn't know the answer to this question, and you helped. Your English-language content, as always, is top-notch; what you tell us for free, we sell for money. Thank you from another country. When I create my masterpiece, I will definitely promote your little channel.
I had it working PERFECTLY and made the grave mistake to update VSC.....
It's not working at all now. Not a single time.
Thank you. And i dont know why but my on my vs studio code is giving me errors that doesnt exist. Like it says you need to put } but i am looking at my code and no i dont have to. It s fine, but errors is still there. I liked the way you speak you dont just tell us how to fix but feel exactly like i am right now.
Everytime i start a new project the intellsense and autocomplete stops works, and i dont know why, this only happens at the new project, the older ones works fines. I always fixes it somehow, but i never remember, this tutorial is so simple and it works, thansks!
idk why but mine is just so broken that this didnt even work :C
just changing the preferences setting fixed everything. i was about ot give up on ever learning to code because nothing worked, but just cahnging the directory fixed it
Thanks this helped a lot a year later!!!
Thx guys, can't really came back to VS after using vsCode for so long
One easy thing to check that got it working for me. Make sure Edit>Prefrences>External Tools> External Script Editor is set to 'Visual Studio' and not 'Open by file extension'. It not the main problem but it started working for me after doing this.
Yeah this isn't working. I'm not sure exactly how I installed it poorly when was installed automatically
I wish you the very best with gratitude from the bottom of my heart. Its a life saver for me...
THANK YOU THANK YOU THANK YOU, THANK YOU!!!!
I tried so many other tutorials and yours SHOWED ME WHAT WAS WRONG THANK YOU!!!
After removing the Unity extension it started working. Thanks!
Thanks so much, I needed this!
you are a lifesaver brother, this just works.
OMG thank you man !!
and a quick tip
you gotta pres ctrl+shift+P
then select Omnisharp:Restart Omnisharp
which will force to start it and runs the stuff like auto complete
hope it help other people who will see this
thank you so much i was about to cry because nothing worked on vs
Not work for unity 2019.1
Thanks mate, worked like a charm!
What I learnt from this video: Keep closing and opening VS Code until it suddenly decides to work.
Oh god I know this feeling!!! a whole day lost to this, sdk issues, hub, editors........ Watching this is a kind of therapy XD
You, sir, are a lifesaver.
Thank you. Open the new Script, close VSC, got to Assets > Open C# Project worked for me!
In the last half of the video, now I probably know why Intellisense is not working, "yet".
After opening C# script from unity, go to Output and in the right side there's choices box. Choose Omnisharp Log, you'll see there it's kind of loading. I think the IntelliSense is still loading. It will take something like 30 seconds on my laptop to load.
I think it's probably OmniSharp that is doing the IntelliSense.
thanks! This helped me figure out why it did not work for me. I got error messages about having the wrong version of dotnet installed and I was also missing a developer pack apparently. I downloaded them from microsoft and now it works, yaaay!