Visual Studio Code Extensions & Settings

I have gone through this course but after going back through, I am seeing that in Visual Studio code I am unable to create variables in the scripts normally as when i try to go to the definitions nothing changes. The code itself runs and works correctly through I am going back through the course for a refresher and learning over some of the material.

So i was not sure if visual studio code had any specific extensions or settings in place that are also used when dealing with abstract scripts and classes.

Below is the StateMachine script as an example

Another example is the PlayerStateMachine as a non abstract class script but still having the same issue.

The colors of the variable types are not the correct color it needs to be. The color of the State variable for example should be the color of the name of the StateMachine class but it is not as the definition does not seem to work.

If anyone has any info or if I am doing something wrong please let me know.

It does look like the new Unity Extension in VS Code is running (noticing the 0 references). Make sure you’re using the right plugin in your Package Manager within your project and that it is up to date.

Make sure that your Editor/Preferences/External Tools is set to Visual Studio Code, and try Refreshing the project files.

Unfortunately, overall, VS Code is a bit of a moving target when it comes to supporting it, as it is an open source program and we don’t have any control over the editor’s breaking changes.

1 Like

That did it, the settings for external tools I think was the reason it was not working.

Thank You!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms