Unity: Fix IntelliSense and Error Checking in Visual Studio

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so i wanted to demonstrate something i've helped a few people with recently and it's a really easy fix so i just wanted to share that with you so what's been happening is sometimes if you install unity or even a new version of unity it's not connecting with visual studio properly so when we go to a script this looks fine right but it won't show errors and it's not going to be working with intellisense it may connect for you properly but if it's not working like this i'll show you how to fix it so first let me make a couple of errors i don't even know what that would be okay and even worse so no semicolons this isn't in quotes this is not debut but notice it's not actually showing an error and also i can't even if i start typing game object it's not even coming up as an option for intellisense because it's not connecting properly notice in the upper left-hand corner it says miscellaneous files so somehow it's not recognizing this is a c-sharp script so let me get rid of this i'm going to go ahead and save it with my errors and i'm going to jump back over to unity and i'm going to go ahead and drag that to a game object but when i run it in the console it's just giving me a bunch of errors so unity is noticing there are errors but visual studio isn't seeming to understand that it's supposed to be working with unity so it's actually a pretty easy fix so let me first just go back to visual studio and close it and then in unity all you do is you go to edit preferences and then on this left side you choose external tools and if it says open by file extension i think that's probably your problem make sure to select the editor you want to use so i'm using visual studio community and i can close this i can go ahead and open my script again and this time it's recognizing it notice here it says assembly c sharp so it understands that it should be looking at c sharp and notice mana behavior now is in blue before it was in black it wasn't recognizing it as a thing and it's recognizing here it points out my errors so that's much easier so there is no debut let's make this debug and um debug log high that should be in quotes right and there's still an error sometimes notice here it's uh giving me a little problem sometimes if you are missing a semicolon it shows the error on the next line so i'm going to go ahead and put my semicolon in here and same thing here it's missing a semicolon and notice sometimes the error shows up on the next line when really the problem was right here also i need to capitalize log so this will make your life a lot easier if it connects properly and now i can type things specific to unity like game object and it will autofill and understand that it is actually a thing i can work with i'm not going to continue with that so it's as simple as that i hope this makes your life a lot easier
Info
Channel: Digestible
Views: 13,621
Rating: undefined out of 5
Keywords:
Id: 5r3O3VMXA0c
Channel Id: undefined
Length: 3min 23sec (203 seconds)
Published: Thu Feb 17 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.