Fix Visual Studio Code Unity IntelliSense AutoComplete (ACTUALLY Working Solution)
Вставка
- Опубліковано 12 вер 2024
- 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.
this guys is so calm and angry at the same time
"Why... Why... Why..."
Famous last words
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
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
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
Congrats man. Doing a better job then the docuentation writters from microsfot and Unity together.
Microsfot, XD
@@ratm4628 And docuentation :p
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
Fuck me this actually worked. For years, I've been looking for a way to do this for 3 years. Thank you sir.
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
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?
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!
Aahah this video is so funny XD Every developer in their life has to fight with these things!
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
bro its not downloading for me its asking me for Sdk and still nothing happened
this video is a whole mood ngl and I love it
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.
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 😛
Thanks a million! I've been having this issue for YEARS!!! Whhyyyy, whyyy indeed. THANKS AGAIN!
What I learnt from this video: Keep closing and opening VS Code until it suddenly decides to work.
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
It worked!
I've downloaded so many extensions and non of them worked.. THIS worked! Thank you.
bro this vid was 2 years ago and still works I actually love you
1. Thanks for the tutorial
2. You made me laugh several times, love the way you did this tutorial
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 😭😭😭.
I like this guy. He's just as pissed off as I am
I went through so many forums but couldn't find the issue, but this helped thanks a lot.💌
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...
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!
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.
i like how inconvenient things happens and your reaction to it
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. :)
ohhhhhhh my gawd i have benn trying to solve this problem for 2 days finally someone worth trying
earned a sub
If it's not working just download the .Net Developer Pack 4.7.1 it worked for me and just close everything and start your project it will work. It worked for me..
If it's still not working just wait for a while and it will work..
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?
idk why but mine is just so broken that this didnt even work :C
Bro, you did a amazing job you helped me 2 times with this Video now! Thanks man!
This was painful to watch. It'll all be worth it for a purely Linux-based Unity dev experience though.
thank you so much i was about to cry because nothing worked on vs
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.
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
Note for my future self:
Dear future self, YOUR FUCKING UNITY KEEPS RESETTING YOUR EXTERNAL TOOLS SETTING!
Hope you have a good day
After 2 hours of looking for the solution, your video finally helped me. Thank you so much!
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
Thank you. Open the new Script, close VSC, got to Assets > Open C# Project worked for me!
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.
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
bro i saw every celeb youtubers and didn't found the soln but with your video i found the solution thanks man!!
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
My man is invoking the transform spirits to join his code...
still doesnt work for me..i did it as you
well mine doesn't have color (only white) no red underline for wrong code and don't have anykind of intellisense
This worked for me until just recently, not sure what's changed but now none of these solutions are working... :(
wow ... 1 minute in the vid and my issue have solve tks dude
wasn't getting any code completion, clicking "Open C# project" in unity did the trick. Thanks
If you still have this problem, try this: double-click the script. After VS being opened, right-click on you solution and click in "Reload project with dependencies". It worked for me.
THIS NOT EVEN BC OF U BUT IT STARTED WORKING OMFG TY
Ive been trying to figure this out for over an hour...... Thank you. opening C# Project within Unity worked.
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
Oh god I know this feeling!!! a whole day lost to this, sdk issues, hub, editors........ Watching this is a kind of therapy XD
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.
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
And don't forget to install targeted .NET SDK, check OmniSharp Log in VSCode for that (if intellisense still doesn't work). It should output missing sdk and whatever. If OmniSharp can't load the project, Intellisense will not work
Why is there no extension for that? I want to use VSCode as a script\text editor, why do I need to load all the project configuration files, install SDKs and whatever. It's all on the unity's part
Do not hate visual studio code hate the decrepit Omnisharp!
I felt "I am not alone "
it just says Attempted to update project that is not loaded:
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
Thx guys, can't really came back to VS after using vsCode for so long
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
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.
I ran visual studio code in admin and that fixed it. Windows 10 was made for paranoid security people, it's the most frustrating version of windows that I have ever used. I've been using windows since 3.11, Windows for Workgroups.
sadly this is actually not working. nothing gets downloaded when clicking on open C#-Project
you just need to create new scripts after installing vs code . scripts created on visual studio wont have IntelliSense . create new scripts and open in vscode it worked for me
Java auto complete not working it's just shows like simple text but keywords and strings shows in different colours
I get some error when download c# extension it tells that is have to download something
I had it working PERFECTLY and made the grave mistake to update VSC.....
It's not working at all now. Not a single time.
IT ACTUALLY WORKED. IT ACTUALLY WORKED.
RESPECT
ACTUALLY WORKING TO THIS DAY
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.
THANK YOU THANK YOU THANK YOU, THANK YOU!!!!
I tried so many other tutorials and yours SHOWED ME WHAT WAS WRONG THANK YOU!!!
Also make sure that you have exactly the right dotnet installed which the OUTPUT asks for. that's not necessarily the latest version! Downgrading to 4.71, in addition to everything in this video, finally did the trick for me. Hope I saved someone some more frustration ;) enjoy!
how do you downgrade the 5.0 to 4.71?
@@sarahpuspdew I don't remember but I think I simply uninstalled and downloaded the proper version
YES! THIS is what solved it. Thank you. Just look at the output in the console that the console says its looking for but is missing and then there should be a link it says to go to where you can download the right version.
Where does it say what version you need
You sir are doing the Lords work 🙏🏾🙏🏾🙏🏾
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
Man this has been my life the last few months. So weird that you have to keep reopening things like this to get it working
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.
Bless your soul dude
1 minute in and you've solved my issue lmao
Visual sutdio code isnt any better now tried all of these but it hasnt made a difference.
Thank you so much friend. for me i just selected visual studio 2019 , and saved and reloaded the project , after this i got a warning but 3D Unity itself made the bug fix [ i think it downloaded that package that you mentioned ]
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! =).
it works bro. keep growing
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
What schould I press to save I just dont get it
This is the only thing that help me thanks.
didn't worked, what do I do?
Ohhhhh, You saved my life. Thank you very much!!!!
I changed to older version c# extension and intellisense (few moths older) and it worked perfectly
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?
I stopped struggling with Vscode and moved to VS, it was just to irittating with Vscode intellisense was working ocassionally
After removing the Unity extension it started working. Thanks!
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.