Visual Studio Code Features Not Working

I am trying to create a new method for “PlayMuzzleFlash” and for “ProcessRaycast” for the Weapon script inside Visual Studio Code, but when I highlight the code and press Ctrl + . to create a new method, Visual Studio Code returns this error (no code actions available) I have also noticed that Visual Studio Code is no longer giving me auto complete suggestions and f2 renaming feature is no longer working. Is there a setting I need to change in Visual Studio Code to get these functions working again.

Kind regards, Luke…

Hi Luke,

Has VS Code worked properly before? If so, do you remember what you did before it broke?

Here is my default answer for troubleshooting VS Code:

Please follow the instruction on this website and make sure all required extensions are installed: https://code.visualstudio.com/docs/other/unity

If the issue persists, please check the console of VS Code (not Unity!). If the .NET Framework 4.7.1 (Developer Pack) is mentioned there, download and install it from the official Microsoft. Here is the link: https://dotnet.microsoft.com/download/dotnet-framework/net471

Depending on your version of Unity, it might be that you will have to install the “Visual Studio Code Editor” package in Window > Package Manager in Unity.

  1. Press Ctrl + Shift + P.
  2. Type “OmniSharp: Select Project” and press Return.
  3. Select the solution workspace entry.

Maybe you’ll have to reboot your computer. Then launch Unity again and open one of your scripts.

Hopefully, this helped. :slight_smile:


See also:

1 Like

It did work before when I was using an up to date version of Unity for a previous project. But then I installed an older version which was recommended to follow along with the FPS Zombie game, I have been having issues ever since. I will try the methods you have mentioned and I am sure it will resolve the problem because I keep getting a message from VSCode to update the NET Core SDK which I think is causing the issue.

Thank you for the response, I will reply back on this thread with the results.

Have a magnificent weekend…

If nothing helps, try to follow with the version of Unity which was working for you. Generally, if you do not experience any issues, keep the version that works for you and update/downgrade only if there is a good reason, e.g. a bug in Unity which prevents you from proceeding or a missing feature.

Have a nice weekend! :slight_smile:

1 Like

Privacy & Terms