❔ ✅ 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
Couple things you can do
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:
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 aboveokk
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
how to do step 1?
1. Re-generate your project file via project settings
BACKUP your project 1st!
just in case
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?$vscode might help
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.pnggonna try next if needed, ty
@BadaBingBadaBoom this is what I got, turns out I was right xD I need .Net FW 4.7.1
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
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
after the installation it works now 🙂
aight glad it worked for you 👍
!closed
!resolved
why is bot not working?
I think it's close
its a slash command
/reslved
/close
ty
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.