Creating a new method

Hi,
Rick showed us to create a new method to clean up the code and he said that when you press Ctrl + . this option should show up. All I get is a “no code actions available” message. Do any of you know what is going on? Is there another way to do this?
My visual studio code doesn’t really give me all the menu’s to scroll down when typing something, like I see happen in the videos. It there something I have to do to make it work?
For a beginner like me it can get a bit confusing when my vsc isn’t doing the same thing as in the video’s.

Hi,

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 in VS Code.
  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.

Did this help? :slight_smile:


See also:

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

Privacy & Terms