❔ ✅ Intellisense in vscode

for some reason my intellisense in vscode doesn't seem to be working for anything Unity related. It works for other types but when I type for example the type MonoBehaviour or ScriptableObject it doesn't compete the typename as I type it. Also it doesn't suggest missing using statements as quick fix when it can't recognise a type from unity. I made sure that OmniSharp extension is installed (c# language support for vscode) and that in Unity on Preferences > External Tools, vscode is selected as the code editor. I also made sure that I opened the correct directory in vscode, I have opened the directory where the git repo containing the Unity project was cloned. What else can I try to fix this?
24 Replies
Cattywampus
Cattywampus2y ago
Couple things you can do
Florian Voß
Florian VoßOP2y ago
I think i have an idea, could it be because I don't have .Net FW 4.7.1 installed? I only have the followings:
Cattywampus
Cattywampus2y ago
1. Re-generate your project file via project settings 2. Reload the developer window by pressing Ctrl+Shift+P then search for Developer: Reload Window then wait until OmniSharp propagates all your files no you don't need to just give a try the step above
Florian Voß
Florian VoßOP2y ago
okk
Cattywampus
Cattywampus2y ago
it will take a minute or two until OmniSharp done propagating all related files... If that's not working, time to google up! Many factors that can cause this
Florian Voß
Florian VoßOP2y ago
how to do step 1?
1. Re-generate your project file via project settings
Cattywampus
Cattywampus2y ago
Cattywampus
Cattywampus2y ago
BACKUP your project 1st! just in case
Florian Voß
Florian VoßOP2y ago
using git version control, dont worry but we expect everything to work exactly like it did before right? it just reloads any dependencies and stuff? kinda like dotnet restore would?
Jayy
Jayy2y ago
$vscode might help
MODiX
MODiX2y ago
1) Install the C# extension 2) 2.a) DO NOT USE OPEN FILE 2.b) Always use Open Folder (from the File menu), and open the folder containing your sln file (or the folder containing the csproj if you have only one csproj) 3) To make the extension start and detect C#, either: 3.a) wait for the prompt that will appear on the bottom right of your screen that ask you if you want it to create some files, and say Yes 3.b) Command Palette (F1 or Ctrl+Shift+P) and type > .Net : Generate Assets for build and run 4) you should see a flame on the Status bar with the Omnisharp logo (see second attached screenshot) 5) it should load to finally say OmniSharp server is running (if not ask for help) https://media.discordapp.net/attachments/569261465463160900/1006652191689429022/unknown.png https://cdn.discordapp.com/attachments/569261465463160900/951015732769079336/unknown.png
Florian Voß
Florian VoßOP2y ago
gonna try next if needed, ty @BadaBingBadaBoom this is what I got, turns out I was right xD I need .Net FW 4.7.1
Florian Voß
Florian VoßOP2y ago
Cattywampus
Cattywampus2y ago
what unity version you're using? older than 2021? if so then yeah that makes sense even so, you shoud not use framework but the Net Standard one, but it's up to you
Florian Voß
Florian VoßOP2y ago
according to chat gpt Unity 2019.4 and later requires .Net Framework 4.7.1 I am using Unity 2021.3 and it complains that I dont have FW 4.7.1 installed so it seems to be correct
Florian Voß
Florian VoßOP2y ago
after the installation it works now 🙂
Cattywampus
Cattywampus2y ago
aight glad it worked for you 👍
Florian Voß
Florian VoßOP2y ago
!closed !resolved why is bot not working?
SG97
SG972y ago
I think it's close
Jayy
Jayy2y ago
its a slash command
Florian Voß
Florian VoßOP2y ago
/reslved
Jayy
Jayy2y ago
/close
Florian Voß
Florian VoßOP2y ago
ty
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server