Search Unity

wierd intellisense coloring ( VS 2019 )

Discussion in 'Scripting' started by raarc, Sep 25, 2020.

  1. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    I just upgraded to visual studio 2019 from 2017 and a lot of colors changed in the formatting.
    I have been changing it back to the old colors but there's something wierd that I don't know how to fix.

    calling methods show the method with a diffrent color depending on the parameters, and I want them both to show the same color.

    Example:

    Code (CSharp):
    1. public void method( int  t){
    2.  
    3. }
    4.  
    5. public int a;
    6. public vector3Int v;
    7.  
    8. ///////
    9.  
    10. method( a); /// method shows as teal color
    11. method(v.z); /// method shows as black color
    so the fact that I have a parameter that is an int is showing one color and when the parameter is a vector.z it shows another color, even though both are ints, obviously this is discriminating between a direct int and a int inside a struct, the question is, how do I fix this so they are both the same color?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    No idea, but here's some intellisense links:

    This may help you with intellisense problems:

    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
     
    raarc likes this.
  3. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    thanks, in this case I believe intellisense is working correctly, it is just not doing what I want, I know I need to change something in fonts and formatting but I don't know what
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    Did you retype the code above or did you copy/paste it?

    The
    Vector3Int
    type is capitalized:

    https://docs.unity3d.com/ScriptReference/Vector3Int.html

    Is that your problem, just that there is no such thing as a lowercase
    vector3Int
    type so the second method call is to some undefined overload?
     
    raarc likes this.
  5. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    no I did it in pseudo code, in my code I have it capitalized correctly

    after searching more i found that to change the color I had to go to fonts and colors and change > User types - Methods

    I found another problem though that also was not fixed by installing visualstudio for unity in the package manager, when I type
    Code (CSharp):
    1. public Coroutine c;
    it doesn't offer to autocomplete coroutine even after installing the package
     
  6. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    Ok thanks kurt one of your links solved it, the external tools were set to deven.exe (wtf?) instead of visual studio. Thanks now everything works
     
    Kurt-Dekker likes this.