How to Setup VS Code For Unity(using VS code with Unity)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
by the end of this video you'll have vs code set up for your Unity project and you'll be able to open your project in vs code like this do code completion like this [Music] and also have intelligence meaning if something is wrong vs code will know [Music] so let me remove all of this for the sake of the video and if you found the video helpful please like the video if you love it subscribe if you want to support you can do it on patreon if you want to join the community you can do it on Discord and yeah let's get started now that we have removed visual studio and all the features I'm going to go to my website then write vs code you can click here if you want and then download the stable version of it so now in my case it's already downloaded so I won't do that download it and then I will just go and start installing it so just hit next next next if you want you can create a start menu no okay I want to create a desktop version and both of these as well so it's basically like this if I let's say go into a folder and right click so more there will be open with Visual Studio code option here as well as if I go to here and go to my terminal I can write code and Dot to open it in Visual Studio code so those are the features I think both of them give and I just want that and I want the desktop app as well so I'm just gonna hit next the next and hit install while that is installing I'm going to open up my Unity hub and I'm going to open this by the way so once it is done hit finish it will open up and what I want is in my case so everything has already been set up now because this is the web developer version of it what you can do in Visual Studio code is that go here and select profiles and go to create profile so I'm going to create gamedev profile right so that it will be completely different the even the designs will be different so here in this profile I will do Game Dev stuff after I do that I'm just going to close this now first thing you need to check is go to your windows go to your package manager although notice that package is already installed but if it is not you need to install this Visual Studio not Studio editor by the way Visual Studio code editor so if it is not installed hit install by going here going to Unity registry and you'll just find it at the end about here see video Studio code enter then go to edit preference go to external tools and in my case Visual Studio code has already been selected if it is not you'll see it here if you don't see it here then what we do is that is why I just selected the desktop option just go to your visual studio right click it open file location and I'm gonna drag it up here my way right up here and just copy this the reason why is because it is not in program files not in these two folders you have to go inside in user then your username then your uh where did it go app data local then there is a programs here I think programs programs then you'll find Microsoft Visual Studio code here so instead of doing that hassle just copy this and then go to your Unity and again reference and if you don't find it just go to browse and just paste it hit enter you'll find that click on code say Okay click on reset argument if you have any argument here to get reset it and set on regenerate program but now once that is done go to your asset and open C sharp project when that happens what should happen is it should ask for you to should have asked for you to like install c-sharp extension fine now just write she sharp and you should find that extension now we will just install it so this is the first extension we installed while that is installing I will also install okay before we do that so now C sharp and Omni Sharps this intellisense only works because of dotnet core so it is saying that.net core is not here and a quick and easy fix is just go to your website and open it you'll find dotnet core to download here you will just download it like this in my case it has already been downloaded so I'm not going to do that and I'm just going to install it so once you download that just go and install.net SDK [Music] moment it is fully installed it will basically stop worrying about that so let it install and while we're doing that just go here and write Unity moment you write Unity what's going to happen is you'll get Unity code Snippets and this does the code completion stuff that I showed as you can see here so I'll just install it now both of them has been installed what should happen is we opened that project from Unity so it should work but if you don't see a fire emblem here it is installed but we need to probably restart our vs code so a few things have been installed that is mostly all we need for it to work so I'm just gonna cut it now now just go here and just to be clear go to your preference and just do regenerate project files really makes it more clear all right after that go here you'll see this Fire Emblem and if it gives any problem we'll have that so there's a problem with intellisense and it is saying so output basically go here click on show output you'll see that the kind of problem will always be there it's saying error the reference assemblies for dotnet framework version 4.7.1 was found missing and all you need to do is control click this website do that you add you to the download page again and instead of dotnet 7.0 go and find.net 4.7.1 click on developer pack you will get a download file just download it it will look something like this in my case I have already downloaded so I will go to the down and I'm going to repair it it has already been installed but I don't know why it doesn't work so just in your case just download it and install it so the moment you do that again remove it and just to be sure just do that two things again preference regenerate code and then finally open it with C sharp project now it should say no problem yep no problem anymore and now intellisense works to see if intelligence worked or not do basically my web do the limit so if it says there is a problem while you do this intelligence has started working and one more thing you can do is write something like f and inside a bracket right X is greater than y it should say there's a problem on both X and Y see yep if that is happening then your code is now working and has Intelligence that is it for this video thank you for watching I hope you like the video smash the like button hit subscribe and have a wonderful day bye [Music] foreign
Info
Channel: ChronoABI
Views: 22,500
Rating: undefined out of 5
Keywords: Game, how to setup vscode for c#, How to setup vscode for u, How to setup vscode, unity visual studio code, unity vscode autocomplete, visual studio code, Unity, game development, Unity game development, .net core, visual studio code setup, vscode intellisense, Setup vs code for unity, unity tutorial, using vs code with unity, ChronoABI, unity3d visual studio code intellisense
Id: bbcPtAwG870
Channel Id: undefined
Length: 8min 24sec (504 seconds)
Published: Sun Feb 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.