Search Unity

Unable to identify rigidbody2D

Discussion in 'Code Editors & IDEs' started by Aykutbakar, Oct 24, 2022.

  1. Aykutbakar

    Aykutbakar

    Joined:
    Dec 12, 2020
    Posts:
    21
    Hello friends!

    I want to define rigidbody2D at first, but it doesn't show up automatically. What is the reason?

    upload_2022-10-24_20-41-2.png
     
  2. NeilB133

    NeilB133

    Joined:
    May 30, 2022
    Posts:
    210
    Make sure you have intellisense working in vs code with Unity.

    This tutorial is a great one to follow:
     
    Aykutbakar likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    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

    ALSO: for future reference photographs of code are generally NOT A THING, although I understand you're showing off the lack of intellisense above.

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
    For these kinds of questions, we have a dedicated Code Editors and IDEs forum.

    I'll move your post for you.