Skip to content

39 comments

go to, edit - prefereances, external tools and make ur code editor the correct ide

2 points

I just did that a minute ago, but it still won't recognize anything from unity.

2 points

Regenerate project files in unity

2 points

I tried that as well. Nothing. I feel like I'm being targeted specifically, because nothing is working the way its supposed to and there seem to be no answers as to why. Nobody else seems to be having the same issue, so I'm not understanding how these things are so broken for me.

1 points

Yeah the exact thing happened to me. In your project files there should be a file that tells you what version you need. You can even change it to a version you have installed. I can't remember right now exactly what the file is called but I'll check when I get home

2 points

I appreciate the help. You've actually helped me out before on here as well. But you don't have to worry about checking. I just went ahead and uninstalled VSCode and downloaded VS 2019 instead. After 7+ hours of digging for a solution, and being stuck at the computer until after 3am, I finally tapped out. Everyone else seems to use VS 2019 anyway, so I figured there's no sense trying so hard to jump through hoops to get VSCode to work.

1 points

The new versions of Unity has Visual Code and Visual Studios installed and they always mess up IntelliSense. Try removing those two and restart your IDE.

1 points

Well... here's the thing. I have completely uninstalled both Unity and Visual Studio Code from my PC. Probably left behind some residual files because I have no idea what to delete and what not to.

Tomorrow I might try to reinstall everything, so is there any way someone could walk me through exactly how to download Unity and an IDE in a way that won't completely f**k everything up to the point where its unusable? Because clearly I can't be trusted to do it, seeing as how all I did was download VS Code and Unity, but somehow managed to break everything.

What all do I need to download? What order? What extensions and tools? Is there anything I may have missed? I'm trying really hard to figure out exactly where I f**ked up to cause this absolute dumpster fire of a problem, but no apparent answers have presented themselves, so all I can think to do is start from the beginning and have someone hold my hand through the process.

1 points

The Visual Code and Visual Studio “installed” I was talking about are the ones found in the Asset Manager window. They’re add-ons already installed when creating a new project. Try removing the add-ons

1 points

Also, if Unity has Visual Studios already installed, why did I need to download my own IDE to write scripts?

1 points

I was referring to the add-ons found in Asset Manager. Not sure what their use is for since they just mess up IntelliSense. I had the same problem with Visual Studio 2019 and took me an hour only to realize those add-ons were fing things up.

1 points

Make sure u have the right. Net frame work. Unity uses 4.7.1 by default. If u downloaded new ones, either change that in the project settings or just download 4.7.1

1 points

I tried to download the 4.7.1 version, but it was only after I had downloaded a different .NET framework in an attempt to fix the issue and I didn't know how to get rid of the other version I had downloaded prior to downloading the 4.7.1 version.

1 points

If u r using windows, u can search uninstall program in the search bar and then find the .net framework there. And u can uninstall it there. Also, make sure u have the unity snippets vs code extension and the vs code package in unity. If u have these things, then it shouldn't be an issue

1 points

Do you have the visual studio package installed from the package manager?

1 points

The visual studio editor in Unity? It was marked with a green check in the package manager, so it should've been installed, right?

2 points

I've had the EXACT same problem. No autocompletion, after a lot of looking on the web i figured it out. Have you downloaded the .Net framework? https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

1 points

Ha... funny story. In the beginning of trying to figure it out, I stumbled across the Visual Studio support page, which told me that I needed to download the framework. However, it didn't tell me which version or how to figure that out. In a shocking display of stupidity, I decided to just pick one, unaware at that time, that I was screwing myself over later on. Skip forward to when I found a video (possibly the one you linked) which I followed along until it came to the framework part. You see, the guy in the video was able to open Visual Studio and click to output a little error message on the bottom of the screen, which essentially told him exactly which version he needed. I, however, had no such error message. Probably because a short while before that, I downloaded some random version of the .Net framework. Which, I'm guessing was the wrong one. But it did clear the error message so that I can no longer figure out which version I do need. I also have no idea how to locate and delete the framework packages that I did install. So I dug myself even further into this pit.

I've just given up on VSCode and decided to sweep that whole thing under the rug. I uninstalled and just installed Visual Studio 2019 instead. Once I selected it as my external editor, it seems to work fine. I just won't know for certain until tomorrow when I can actually try it out.

1 points

You are not alone - this happens quite a lot. In my case closing VSCode and opening the project through “Assets->open c# project” (something like this iam not at my machine) solves the problem. May take 3-4 restarts and always make sure to wait until intelli sense inits. Would be great If someone knows exactly why this happens. It does on multiple machines wir Windows 10 and MacOS for me.

1 points

I tried for hours to get it to work. Probably over 6 hours in total. I exhausted all options. Nothing seemed to fix it. I waited, I tried opening through different setting, changing the settings around, installing various extensions, selecting as my external editor, checking my unity packages... nothing. I ended up finding a video that suggests its some .NET framework issue, but I had already screwed up my chances of fixing that issue by the time I figured that out. (See some of my other comments for more details) anyway, I just gave up on VSCode. I switched to VS 2019 and it seems to be working proper, though I won't know for certain until tomorrow, when I can try it out.

1 points

Your intellisense isn't set up correctly or a package hasn't been downloaded that it loads the defaults from. It happened to me after installing Unity and Visual Studio.

1 points

It wasn't just intellisense. Even when I typed out "Rigidbody2D" entirely, it didn't work. Or "GameObject" or any of the other keywords. None of them were recognized by VSCode. I aldo checked to make sure ai had the VSCode editor package for Unity. They still weren't working together.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.