Тёмный

How to set up Visual Studio Code for Unity 

Zigurous
Подписаться 24 тыс.
Просмотров 163 тыс.
50% 1

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 216   
@treydiaz3633
@treydiaz3633 Год назад
I just love how much faster vs code loads, the themes, and how it has the file explorer open in it
@SpaceifyYT
@SpaceifyYT 2 года назад
OR ANYONE STARTING UNITY IN 2022, PLEASE DO THIS BEFORE WRITING ANY SCRIPTS: Unity and Visual Studio will sometimes have a compatibility issue where something called Intellisense does not work. Intellisense is your code completion, and much more. It should be fixed immediately. Step 1: Close Visual Studio Step 2: In Unity, go to Edit < Preferences < External Tools (left part of the Window) Step 3: In External Tools go to the part that says External Script Editor (this should be on which ever Visual Studio editor you are using (for me it defaulted to "Open by File Extension" Step 4: Make sure Generate all csproj files are checked, and Editor Attaching is checked Step 5: Open the C# script you were trying to open earlier. I copied it from mEmEMan as i was facing this problem
@KappKee
@KappKee 2 года назад
A quick reset of Omnisharp did the trick for me. Ctrl+Shift+P in VSC and select 'Omnisharp: Restart Omnisharp'.
@lavaa7392
@lavaa7392 2 года назад
Loved the tutorial. It's very concise. I'm dealing with an issue on my end though. I was hit with a couple errors in the output log so I decided to install the .NET framework like you recommended. I restarted everything and got hit with errors again. One of them asked me to get an older version of the .NET framework (4.7.1). If anyone knows what the issue is I'd appreciate the help.
@boreddev9252
@boreddev9252 2 года назад
did you find a solution for this?
@lavaa7392
@lavaa7392 2 года назад
@@boreddev9252 Yeah I was just confused because there were two versions on the site. There's the general .NET and there's the .NET framework. I needed to download both.
@Nekotico
@Nekotico 2 года назад
the logs on vs code says, i need .net 4.7.1, visual code studio didnt even pick gameObject....
@Zigurous
@Zigurous 2 года назад
If you are still having problems, download the .NET Framework 4.7.1 Developer Pack, as this specific targeting framework is used by many versions of Unity: dotnet.microsoft.com/en-us/download/dotnet-framework/net471 A recent update to the C# Omnisharp extension in VS Code required me to download .NET 6 (or newer) in order for my projects to load correctly in VS Code. The download page is here: dotnet.microsoft.com/en-us/download/dotnet You may also need to restart your Windows computer to allow system environment variables to update. If all else fails, follow these steps: code.visualstudio.com/docs/other/unity#_prerequisites
@ricoash6625
@ricoash6625 2 года назад
Thank you🥲
@supernovatluthelightoftheu3221
@supernovatluthelightoftheu3221 2 года назад
i downloaded and installed the sdk still doesnt work plz help.
@sweif677
@sweif677 2 года назад
@@supernovatluthelightoftheu3221 Close your vs code and reinstall .NET core SDK It worked for me
@supernovatluthelightoftheu3221
@supernovatluthelightoftheu3221 2 года назад
@@sweif677 I did
@CCheukKa
@CCheukKa 2 года назад
@@supernovatluthelightoftheu3221 I have read that a new update means that a critical package (MSBuild) for the C#(OmniSharp) extension is no longer installed alongside. I had to actually go install Visual Studio and choose the .NET Framework package during installation in order for VSCode to work. Very weird and convoluted installation process but it worked for me.
@Questionable_Insights
@Questionable_Insights 2 года назад
Nice timing. I was about to lookup a tutorial regarding this.
@knightyFX
@knightyFX 2 года назад
Nice timing indexed
@LiamOfOzz
@LiamOfOzz 2 года назад
It's showing me "Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)" any idea how to fix this? I've tried looking on StackOverflow to no avail.
@candleo.
@candleo. 2 года назад
Nobody ever told me visual studio and visual studio code were different! Thanks. After 2 days of research, I found such a good vid and I'm finally able to do something. Definitely gonna leave a like. 😄
@candleo.
@candleo. 2 года назад
All details included, such a useful vid.
@Francisco-Gutierrez
@Francisco-Gutierrez 2 года назад
Great video as always. I use Visual Studio since it came as default, but I might change to VSCode since it is more lightweight.
@stephenkentperez7705
@stephenkentperez7705 2 года назад
10:58 I noticed that theres an italized code snippet auto-suggest. how do you turn that on (& off)?
@Geeks-Odyssey
@Geeks-Odyssey 2 года назад
This was exactly what I was looking for! Super helpful, thank you!
@Steve18795
@Steve18795 2 года назад
Hi thanks for the video. I followed the steps and my project loads correctly in vscode but intellisense still not working even after regenerating project files
@tadeob_
@tadeob_ 2 года назад
same here
@mru_lord8540
@mru_lord8540 2 года назад
Hi i have a problem i dont know why when i oppening ws code on the down right side there are write Some projects have truoble loading. Please review the output for more details And i dont now whats happend and how to fix that can u help please
@fiatlux805
@fiatlux805 2 года назад
I have the same issue- can't figure out how to fix it
@mattiiiww
@mattiiiww 2 года назад
Same
@arunabhrakshit
@arunabhrakshit 2 года назад
i use visual studio 2022 so i just install the unity development workload and then change the code editor in unity to vs 2022
@jacobwigent1931
@jacobwigent1931 2 года назад
Thank you so much!!! My intellisense has not been working for weeks and I could not figure out why until wathcing this video.
@VRPlayYT-lb5fj
@VRPlayYT-lb5fj 7 месяцев назад
THANK YOU this helped alot
@maksimnarrates1826
@maksimnarrates1826 2 года назад
Did you have to install Microsoft.Unity.Analyzers through NuGet? If so, could you explain how to do that please?
@jordanbentley
@jordanbentley 11 месяцев назад
Today I learned VS and VS code are two different things... super helpful video, thanks!
@HikikomoriDev
@HikikomoriDev Год назад
I remember the days of Unity 5 when another editor was used. It was so long ago I forgot the name of the editor lol
@dDoublevisioNn22
@dDoublevisioNn22 5 месяцев назад
MonoDevelop!
@Prince_mdz
@Prince_mdz Год назад
thank you for this tutorial it helped a lot , I was having trouble switching Microsoft Visual Studios to Microsoft Visual code! The only issue I'm having as of right now is when I open the C# I'm getting a .NET Core SDK error of it not being able to be located, if there is any suggestions on what to do about that I'll appreciate it!
@seannosoup
@seannosoup 2 дня назад
very quality setup video, covering alternatives and navigating to windows in simple but reliable ways while explaining whats going on compared to a point and click adventure through gui windows that some tutorials are
@Epistemophilos
@Epistemophilos 2 года назад
I followed all your steps, but VS code still refuses to do intellisense - for certain methods. E.g. it will recognize Input.GetKeyDown, but not the OnCollisionEnter method. Studio 2019 does it all perfectly.
@amarpatel6073
@amarpatel6073 2 года назад
Thank you so much I've been trying to figure this out for a VERY long time
@jacquelineparedes9385
@jacquelineparedes9385 2 года назад
When I check Package Manage, I notice that Visual Studio Code Editor is already installed in the project. However, when I go to Preferences and click the External Script Editor dropdown, it doesn't show Visual Studio Code Editor as an option. Does anyone know why this might be happening or how I could find the vs code editor?
@md.iftakharkabirsakur7717
@md.iftakharkabirsakur7717 Год назад
Same I am not getting VS code option in anywhere.What to do
@pianochad
@pianochad Год назад
Very well put together video. Easy to follow, worked like a charm. Thank you !!
@useless.production
@useless.production Год назад
thank you so much! This will make my game development be much quicker :)
@Pasora
@Pasora 2 года назад
Thank you
@ledschmidt1441
@ledschmidt1441 6 месяцев назад
I've been following your videos for a few days now, sure am glad I found you. I'm so green on Unity a little bit better with VS but please answer a couple quick questions. As I'm coding Pacman your VS has the left side showing all the files etc in Unity, with your coding window split, I can split a window in VS but How do you get this left side menu? Also, since I'm halfway thru doing pacman by hand, but I'm getting some goofy errors and wanted to download and install your project code, and compare each for educational purposes.... If I do that what happens to project already started?
@irinaklemmer3176
@irinaklemmer3176 2 месяца назад
Thank you but i have a problem that it just gets the code that was in the script but when i try void OnCollisionEnter2D it just doesn't show up😢
@afrakes4510
@afrakes4510 Год назад
#pro Perfectly executed How-To-Torial! You should make another vid called "How-To make How-To videos Tutorial"
@kylemayer7002
@kylemayer7002 Год назад
SOLUTION: I followed this video, but I still coudn't quite get it to work. I had to look at the log and find out what version of .NET I was missing. In my case it was .Net SDK version 4.7.1. (Even though I had previously installed the most recent version of the .NET SDK). Hope this helps someone.
@theUnfrench
@theUnfrench Год назад
Currently trying to follow this, though can't get past the "External Script Editor" bit. When I click the drop down menu there, nothing shows up. Just shows "Open by file extension" and "browse". Any clue what I'm missing here??
@RogerSthow
@RogerSthow Год назад
Thank you so much for this video, you helped me a lot!!
@blockblockgoose
@blockblockgoose Год назад
Hey I ran into problems when following your tutorial. When I made a C# script to see if everything was working correctly it came up with warn and fail because I didn't have .Net so I installed the latest version .Net 7 and I was hoping it would fix the issues but it didn't and now it's saying "warn" or "fail." It says it failed t load my project file and I'm really confused I found a post on stack overflow about this same problem but they had no solutions.
@sumrandomguy6957
@sumrandomguy6957 Год назад
Thank you so much now i can get to work on coding my game
@stefaniafiorucci9826
@stefaniafiorucci9826 Год назад
My VCS Explorer doesn't show anything, only the actual code Im working on. I have no idea what Im doing wrong, please help??
@jademonass2954
@jademonass2954 Год назад
you are a godsend 3rd time attempting unity and the first time i manadged to sync up coding, thank you
@morbus5726
@morbus5726 2 года назад
how did you know I was having trouble with this?? Thanks for the vid lol.
@knightyFX
@knightyFX 2 года назад
100th comment
@magia136
@magia136 Год назад
Whats your extensions? It seems you have some intellicode that suggest you to write your next script by tabbing it Can you list your extensions?
@OrkhanJulfa
@OrkhanJulfa Год назад
After "powered by OmniSharp disappeared VS Code doesn't work properly with Unity :( is there way to fix it?
@justice83
@justice83 2 года назад
BUT, what about debug break-points? I couldn't get this working in VS Code recently and seems it might be broken?
@EremesNG
@EremesNG Год назад
I'm looking for that too, how you fix it?
@JJforYoutube
@JJforYoutube Год назад
@@EremesNG did you fix it?
@eliplay123
@eliplay123 2 года назад
I loved the video but I wanted to know if you could be so kind to share your UI configuration like, for instance, your font, font size, etc. By the way, I really appreciate your content and I instantly subbed! Keep it up.
@Zigurous
@Zigurous 2 года назад
I use the built-in Dark+ (default dark) color theme. I like to use a font called FiraCode (github.com/tonsky/FiraCode) because it has custom ligatures, but I turn that off for my videos because it confuses people who aren't familiar with them. No specific font size because I tend to increase and decrease the size often using Ctrl/Cmd + and Ctrl/Cmd - keyboard shortcuts. Generally, mine is on the larger size though.
@eliplay123
@eliplay123 2 года назад
@@Zigurous Thank you very much for your response!
@vrfxrealtime
@vrfxrealtime Год назад
Thanks for this helpful intro! for all the user that are seeing this video a year later like me ;) the new package has a blue icon and it does not say powered by omnisharp, however it works the exact same way as shown here. this is the same extension as show in the video: ms-dotnettools.csharp below the title C# Base language support for C# by microsoft, right now its v1.26.0 and in unity the package also has one .5 1 version higher :=)
@mikethemusicman1978
@mikethemusicman1978 7 месяцев назад
What is the background music you're using, it's very mellow.
@softart5235
@softart5235 2 года назад
woww....i was in trouble until this ......THANKYOU
@doke4090
@doke4090 2 года назад
TNice tutorials is exactly about everytNice tutorialng that you'll ever need to do to make soft on soft soft
@duacky
@duacky Год назад
bruh. i thought it was visual scripting. i just downloaded everything
@yellowdev5320
@yellowdev5320 2 года назад
Thank you so much for this video. It was very useful for my Unity setup with VS Code!
@richardspillers6282
@richardspillers6282 Год назад
Yeah this is way over my head. I have all this and it's become a pain. Unity still doesn't see any of this stuff.
@Lucy0806
@Lucy0806 Год назад
How I can install the package of visual studio code in unity older version
@LuzuVlogsGamer
@LuzuVlogsGamer Год назад
Can we use Visual Studios if we have it already installed or will it be way better for vs code.
@mossthecreator
@mossthecreator 2 года назад
You are an incredible human. This video was so clear and concise. Visual Studio Code is finally working how it was meant to and I'm so excited. Thank you :)
@wilson214-n3e
@wilson214-n3e Год назад
mine doesn't show the "generate .csproj files" 5:40
@FaceCol
@FaceCol Год назад
Thank you!! I was having problems with classes not showing up properly. Now it is working as I need. Cheers
@AssassinR8.
@AssassinR8. 2 года назад
do i need to install visual scripting?? from package manager
@phonix374
@phonix374 2 года назад
so your name is adam it is an arabic name so you speeck arabic right
@wellzerc1357
@wellzerc1357 2 года назад
It keeps failing to install no matter how many times I regenerate files 8:50
@Shiftingreubix
@Shiftingreubix Год назад
I dont know why but i dont have the visual studio code editor
@ivanivanovski1
@ivanivanovski1 6 месяцев назад
How do you attach to the editor for breakpoints?
@mounicadivya3456
@mounicadivya3456 2 года назад
Thank u soo much. i was wondering y it didnt soft the sa for as well
@023achilles
@023achilles Год назад
Ctrl Shift P : Restart Omnisharp!
@mamtapatil1892
@mamtapatil1892 2 года назад
VS code is not coming in the preferences dropdown
@milosnovakovic3838
@milosnovakovic3838 2 года назад
Like for tNice tutorials helpful tutorial
@oddwirt
@oddwirt Год назад
th so gosh dang much i almost quit on this entirely
@glibdesh
@glibdesh Год назад
can you give me the link that is for 32 bit net
@fastrabbit5211
@fastrabbit5211 2 года назад
Myanmar dia Light I got it foe freeeee niggggaaaaa
@ONLYSATORO
@ONLYSATORO Год назад
Now that's what I call it a fixer guy
@imw8721
@imw8721 Год назад
very very underestimated channel ever
@bartoszsiminski3884
@bartoszsiminski3884 2 года назад
When i try to open my code it gives me a warning and asks whether to trust current folder. What should i do?
@Zigurous
@Zigurous 2 года назад
That's a newer feature of VS Code. It just prevents malicious code from running if you were to accidentally open something you didn't mean to. You can trust the folder for your project.
@bartoszsiminski3884
@bartoszsiminski3884 2 года назад
@@Zigurous Thank you for your answer!
@AidenDev123
@AidenDev123 Год назад
i can,t find c# in my visual studio code
@madplayer5
@madplayer5 Год назад
Thank you, it helped!
@oportaldepedra2662
@oportaldepedra2662 10 месяцев назад
It worked for me, thank you
@SebastianSMV
@SebastianSMV Год назад
Thank you, this worked perfectly!
@joshSmithlovelife
@joshSmithlovelife Год назад
What about vs community?
@walkerandcolten8317
@walkerandcolten8317 2 года назад
My project failed to load in
@creativearts4917
@creativearts4917 Год назад
can you please make a video on how to setup unity from start, i searched ur channel for unity installation tutor but only found this vid. You showed almost everything in this video thats grt✌🏻 but it could be better if you show it from start Unity Hub -> the licensing -> The Unity -> The Code Editor n all, Thanks🙂
@johngayman4100
@johngayman4100 2 года назад
.NET Framework builds of OmniSharp no longer ship with Mono or the MSBuild tooling. To ensure that the C# extension remains usable out of the box for .NET SDK projects, we have changed the default value of omnisharp.useModernNet to true. If you still need Unity or .NET Framework support, you can set omnisharp.useModernNet to false in your VS Code settings and restart OmniSharp.
@JGCD21
@JGCD21 4 месяца назад
Do I need to download unity on my chromebook to be able to edit scripts
@nath_gaming532
@nath_gaming532 3 месяца назад
if you just want to edit script you don't need unity
@khaledalshaikh5991
@khaledalshaikh5991 Год назад
THANK YOU!!!!! Oh my god I spent days trying to fix this issue and you solved it in minutes!
@plushgray
@plushgray 2 года назад
Oh hell yea this video fixed the Intellisense problem I was having! Thank you thank you!!!
@Asirrelle
@Asirrelle 2 года назад
My Solution File wasn't displaying in the bottom left. I had to download the .NET SDK to get it to work. It's really strange, because I've been using Visual Code for a few years without this problem, then it suddenly happened today. Thanks for the help!
@faffa8149
@faffa8149 2 года назад
Thx. I have bad internet and vs takes so long to download and VS code not and I followed the steps thx Edit: I couldn't do it some how
@meetpatel6632
@meetpatel6632 Год назад
Thank you for the video due to this I am able to solve the intellisense problem with C# in VS code. I am searching for the solution for hours and I finally found it.
@ledamdevol
@ledamdevol Год назад
Thank you SO MUCH! I watched a game tutorial video and they skipped how to connect Unity with the coding program and stuff. Stuck there for a while until I found your video 😅
@shadowblaze6386
@shadowblaze6386 2 года назад
thank so much this help a lot
@jasonmoor4210
@jasonmoor4210 2 года назад
Thank you for this video. I kept seeing that I needed to change the selected editor externally. I assumed that had to be in the hub somewhere. wasted 20 min instead of finding your video.
@AndrewLyon23
@AndrewLyon23 Год назад
Great advice! (One thing, maybe move the mic back or play with your mic settings. I had to turn the volume way down to avoid all the sticky mouth noises that were setting my mysophonia off.)
@colingreen8470
@colingreen8470 Год назад
thank you so much, for the video, this fixed my intellisence issue. 👍⭐⭐⭐⭐⭐
@IzuliSftAlt1
@IzuliSftAlt1 Год назад
Omg thanks for this tutorial I was trying to find tutorials like this for years and finally i found one
@Wulterchen
@Wulterchen Год назад
6:09 very important tip...
@michaeltomilobamfon3433
@michaeltomilobamfon3433 2 года назад
Thanks a lot, I had to follow till regenerate, then after a couple of failed tries I used the VS code to open a new folder before retrying open C# project from unity editor that's when intellisense started working.
@Apple-ix9nj
@Apple-ix9nj 2 года назад
thanks for the help I was stuck for so long without VS i thought I was just being dumb.
@tuanhung8864
@tuanhung8864 2 года назад
Thanks so much for tNice tutorials video, it helped so much!
@enkioki
@enkioki 2 года назад
Yessssssssss!
@1..1..1..1H
@1..1..1..1H 2 года назад
It's been two weeks...... I don't want to program any more.
@1..1..1..1H
@1..1..1..1H Год назад
I've reached my lowest point tow years ago. I didn't quit.
@jhaysuyom7827
@jhaysuyom7827 Год назад
thanks for this vid bruhh.. really helps me setting up🔥
@topik_-su2qz
@topik_-su2qz 2 года назад
I love you so much bro
@ericokonkwo6260
@ericokonkwo6260 6 месяцев назад
Thank you sir
Далее
.NET and C# are in trouble. Here is what I'd do.
10:57
Better Coding in Unity With Just a Few Lines of Code
15:27
How to make Tetris in Unity (Complete Tutorial) 🧩🧱
1:57:39
The Art of Code - Dylan Beattie
1:00:49
Просмотров 4,7 млн
Hack your brain with Obsidian.md
11:53
Просмотров 1,9 млн
C++ vs Rust: which is faster?
21:15
Просмотров 396 тыс.