Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Intellisense not working properly.

Discussion in 'Scripting' started by ohellum, Apr 22, 2020.

  1. ohellum

    ohellum

    Joined:
    Mar 15, 2020
    Posts:
    1
    Title.

    I'm taking the C# Survival Guide course, and I keep noticing differences in my Visual Studio. Some are as follows:

    Unity variables(sprites, text, etc.) not being suggested.
    Custom Classes being suggested in the Intellisense with a red X icon.
    The text for Unity variables and custom classes is white, rather than light green.

    And so much more. Of course, it is all still functional, but I feel like I'm missing something. Can anyone help?
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Make sure you have
    using UnityEngine;
    at the top of your script.

    I'm not too sure what this means. Could you post a screenshot?

    That just sounds like different editor preferences.
    In Visual Studio, navigate to:
    Tools > Options > Environment > Fonts and Colors
    .
    In the Display Items list, scroll down until you find "User Members" and "User Types".
    From there, you can change the fonts and colors for various member and type keywords. It's all preference, of course, and makes no difference in your code's functionality.
     
  3. Dextozz

    Dextozz

    Joined:
    Apr 8, 2018
    Posts:
    493
    1) From Unity go to Edit > Preferences > External Tools > Generate all .csproj files, set it to true.
    2) Close Unity
    3) Go into your project root folder (via Windows explorer or similar if you are not on Windows)
    4) Delete all .sln and .csproj files inside
    5) Reopen Unity so it regenerates them

    That should fix your issue. If not, then, if you are using Visual Studio (NOT Visual Studio Code), when you open it try reloading the solution. This is done by going to File > Close Solution and then reopening it again with File > Open Project/Solution.

    This is what always fixed it for me.
     
  4. Shiv2k3

    Shiv2k3

    Joined:
    Jun 30, 2019
    Posts:
    118
    Why does this happen though?
     
    krazygoose likes this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,522
    Why ask why? Try Bud Dry! I think if anyone knew, they'd likely fix it.
     
  6. LloydNicholson

    LloydNicholson

    Joined:
    May 4, 2020
    Posts:
    1
    My issue was due to the fact that there was a .vsconfig file and .vs folder that I were generated automatically on Windows by Visual Studio conflicting with the Visual Studio for Mac configurations. So make sure you also remove all .vsconfig files and .vs folders when you do the above steps.
     
  7. snapcour

    snapcour

    Joined:
    Jun 7, 2019
    Posts:
    1
    This was exactly it! I'd been hunting for a solution for 9 hours now and this is it. Thanks!
     
  8. aroldo

    aroldo

    Joined:
    Dec 30, 2012
    Posts:
    4
    I know this thread is old, but in my case, I just updated to the latest Unity Editor and the Intellisense stoped working. The fix by @Dextoss worked fine.
     
  9. stiy27

    stiy27

    Joined:
    Aug 19, 2018
    Posts:
    1
    Thank you, man.
    I restarting my studing in a new PC and intellisense not work.
    You help me a lot.