Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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

Discussion in 'Editor & General Support' started by mrgolemm, Aug 22, 2021.

  1. mrgolemm

    mrgolemm

    Joined:
    Jun 25, 2019
    Posts:
    10
    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:
    upload_2021-8-22_18-41-53.png

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

    upload_2021-8-22_18-42-16.png

    How to fix this?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,749
    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.

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

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

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. mrgolemm

    mrgolemm

    Joined:
    Jun 25, 2019
    Posts:
    10
    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:
    upload_2021-8-25_23-14-35.png


    upload_2021-8-25_23-15-31.png

    it works!
     

    Attached Files:

    Kurt-Dekker likes this.
  4. ValentineCat

    ValentineCat

    Joined:
    Feb 15, 2021
    Posts:
    10
    I don't see an Other item, only Genera upload_2022-3-19_10-27-47.png
     
  5. tigme

    tigme

    Joined:
    Jul 1, 2014
    Posts:
    37
    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)
     
    xozzox likes this.
  6. toprakf

    toprakf

    Joined:
    Apr 19, 2021
    Posts:
    3
    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.
     
  7. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    301
    My solution to move on,, use VS 2019,, instead.. that works.

    upload_2023-1-7_15-5-48.png
     
    DicoLeeChernWai likes this.
  8. gsho

    gsho

    Joined:
    Jan 26, 2016
    Posts:
    1
    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.