Visual studio doesn't show Intellisense for Unity methods found in Assembly Definition

Visual studio doesn’t show Intellisense for Unity methods found in Assembly Definition.

Here I want to write an OnCollisionEnter method
and Visual Studio does autocompletion successfully:

But if I try to do it in a script that is in Assembly Definition, Intellisense will not see Unity methods:

How to fix this?

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

Solution: From Visual Studio, go to Tools → Options … → Tools for Unity → Other. Under Show connectivity icon, set it to true then restart Visual Studio.

After that, click in the upper left corner where the dll name is located:

Change to else:
7447940--913409--upload_2021-8-25_23-14-35.png

it works!

7447940--913403--Screen.png

1 Like

I don’t see an Other item, only Genera

I agree, don’t see it either. Can’t get a fix for it too. I Switched over to the Script Inspector Asset for now. It is not ideal but I had the asset (Script Inspector 3)

1 Like

I think either the new version of Visual Studio Mac or Unity is broken. I have the same problem and can’t find a solution.

My solution to move on, use VS 2019, instead… that works.

8712486--1177512--upload_2023-1-7_15-5-48.png

2 Likes

Have to go into Unity…

Check that Visual Studio is set as your external script editor in Unity using Edit / Preferences / External Tools . Depending on your Unity version: Check that the Visual Studio plugin is installed in Unity. Help / About should display a message like Microsoft Visual Studio Tools for Unity is enabled at the bottom.

Worked for my with VS2022.

1 Like

It only worked for me once I checked all the boxes under ‘Generate .csproj files for:’ and selected Visual Studio as my external script editor. Hope this fixed the problem for anyone in the future who’s reading.

2 Likes

it works for me, thank you.