Search code examples
c#unity-game-enginevisual-studio-code

Why is my VS Code text all the same color for C# code?


I use VS Code and for some reason, all my C# code is mostly the same color. At first when I open VS Code it looks like this:

Image 1

But, as soon as I type something it looks like this:

Image 2

It's kind of hard to see different variables or methods when it's all the same color. Any idea why it looks like that? Also, I'm not sure if it helps but I'm using unity as well.


Solution

  • It looks like that VS Code has problems communicating with Unity. Because all the Unity stuff is blue, the rest is colored as normal.
    I would check if VS Code is set as editor. You can see it here:
    Edit -> Preferences -> External Tools -> External Script Editor
    Make sure VS Code is set there.