In Visual Studio Code, most Unity snippets aren’t showing up.
Snippets such as void Start() and void Update() are showing up just fine, however, the Input snippets aren’t functioning.
//When I type in
Input.GetKey(KeyCode.)
//the course lecture says that all possible methods will be shown in a list view.
//That is not happening for me and I have to manually type in
Input.GetKey(KeyCode.Space)
It is not a critical issue, but needs to be addressed and hopefully fixed. I have installed the Unity code snippets that the teacher had instructed us to download in the 4th lecture. If you have a solution, please reply.
Please follow the instruction on this website and make sure all required extensions are installed.
And download the .NET Framework 4.7.1 (Developer Pack) from the official Microsoft website and install it. Here is the link: https://dotnet.microsoft.com/download/dotnet-framework/net471
Maybe you’ll have to reboot your computer. Then launch Unity again and open one of your scripts.
If it’s not working even after installing all the required packages in VS Code then I would suggest you to use Microsoft Visual Studio, from the Microsoft Visual Studio’s installer you can directly install the packages required for unity and you can also install the .NET Framework (Developer Pack) from the installer.
Note – VS Code and Microsoft Visual Studio are different.
I know its not the solution you were asking for but neither I’ve had any idea about this, but Microsoft Visual Studio will get the job done.
Is there any way to install Unity’s snippets onto Visual Studios 2019? Before I started this course, I was using MS Visual Studio Community and I am uncertain if they do have working snippets.
I think I have a solution. The snippets customisation file is stored in a specific folder in Windows. The Unity snippets might be stored in the same folder.
If you operate a Windows device, please go to the following directory in File Explorer;
Yes, there is a way. Just look for the Unity development tools in the Extensions menu.
The package can also be installed during the installation routine.
I looked for the Snippets folder on my harddrive and was not able to find it. Unless I’m wrong, you are looking for IntelliSense in VS Code, not for code snippets. See here:
In Unity, in Window > Package Manager, is the Visual Code Editor package installed? And is VS Code selected as your External Script Editor in Unity (Edit > Preferences > External Tools)?
The “a” in 2021.2.0a10.1508 stands for alpha. Alpha versions are known for being buggy and are not meant to develop an actual game. I would recommend to update or downgrade to a stable version, one with an “f” in its name.