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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

No autocomplete

Discussion in 'Editor & General Support' started by DrDress, Oct 16, 2019.

Thread Status:
Not open for further replies.
  1. DrDress

    DrDress

    Joined:
    Sep 11, 2019
    Posts:
    30
    Hi

    When I want to do collision detection I use the OnCollisionEnter2D(Collider2D col) method or maybe the trigger version. But I have to write the entire method by hand. I was a toturial where it autocompleted it. That would be sooo nice since I always screw up some part of it. Maybe I mix up Collision with trigger or forget the 2D part or the argument is wrong. It actually costs me quite some time every time I write this. So do anyone know why it won't auto complete?
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    927
    unity_vD5FZlREXe1I6A likes this.
  3. DrDress

    DrDress

    Joined:
    Sep 11, 2019
    Posts:
    30
    Ok. Thanks a lot. I'll try that.
     
  4. naztechmedia

    naztechmedia

    Joined:
    May 28, 2023
    Posts:
    1
    I was looking for solutions as well. In visual studio code I was able to fix the issue by enabling the setting "Enable Import Completion". After this, all of the auto complete methods and commands started showing up in the auto complete widget, including the "OnCollisionEnter2D", as well as enabling syntax highlighting for the same methods and commands. Hope this helps.
     
  5. Kurt-Dekker

    Kurt-Dekker

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

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

    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
     
    Christin2015 likes this.
Thread Status:
Not open for further replies.