
Some people like a quick IDE without a lot of flashy tools while others prefer the vanilla installation. Regarding why use Visual Studio Code vs Visual Studio ? It’s a preference really. Once you generate your project files you should see similar build and run options between Visual Studio and Visual Studio Code The fact that you mention Visual Studio itself works that’s positive. While I have not seen this type of corruption to project files you never know. If for some reason that process is not generating the required project files you may want to delete them and try again. Hmmm once you generate the project files for Visual Studio Code from within the Unreal Editor you should be able to “launch” VSC from within Unreal.
This should then give you the option to re-generate the Visual Studio project within Unreal Editor ( File -> Refresh / Generate Visual Studio Project ) Once this is complete you simply follow the initial set of instructions but instead of picking VS Code just select Visual Studio 2015/2017. Specifically the following folders / files inside of your root project: In case you are not happy with Visual Studio Code and want to revert things back to use Visual Studio I recommend cleaning up the files the VS Code integration generated. Here is a list of plugins I currently have configured:ĭeleting Visual Studio Code references and changing back to a different editor The only other thing you may want to setup within Visual Studio Code are a number of plugins that assist with intellisense, auto complete, etc etc You are now setup to use Visual Studio Code. To do so you can go to Terminal -> Run Build Task or simply hit CTRL + SHIFT + B
VISUAL STUDIO CODE UNITY CODE COMPLETION NOT WORKING HOW TO
The only other thing you need to be aware of is how to get at the build targets. You should now be able to see the IDE getting launched from Unreal and your project available for compilation.
To open up Visual Studio Code go to File -> Open Visual Studio Code. This generation step will take a few seconds to complete. Once this is done you should now be able to generate a new Visual Studio Code project using File -> Generate Visual Studio Code Project. Then go to General -> Source Code -> Source Code Editor and select Visual Studio Code. Open Unreal Editor ( source or binary doesn’t matter ). Once you have these pieces installed, let’s move onto the Unreal Editor configuration Visual Studio Code will recognize what you have these packages installed and assign the correct compiler configurations. Ensure that you either have Visual Studio Community 2017 installed or alternatively just the Visual Studio Build Tools as you need something to still compile the code. Similar to my earlier post there are a few prerequisites you need to have available / installed to follow this tutorial: Visual Studio Code is a fairly lean IDE based on the Electron framework that was designed to tap into the market of Sublime, Atom, etc etc but it works just fine as a C++ editor. also autocomplete like they should.In the spirit of show casing alternative ways of working with Unreal and C++ I wanted to share with you guys how to use Visual Studio Code as your primary IDE. Many Unity things, like Vector3, GameObject, Destroy, transform, etc. autocomplete, so the C# extension seems fine. Generic C# things like return, void, int, etc. NET, Mono, Debugger for Unity, the C# extension, and got Unity Tools for good measure. I looked at this Microsoft help page about VS Code and Unity, and I have everything it I seems I would possibly need to combine the two I have. However, many other Unity things do automatically show up as options. I have been following along with a tutorial and the autocompletion functionality of Code seemed fine until the function OnTriggerEnter, which was shown as autocompleting for the guy in the video (who was using the other Visual Studio), didn't fill in. Things seemed to work fine between Unity and Visual Studio Code, but now I realize that something is wrong with Code. I am using Unity 2018 with Visual Studio Code version 1.43.2 on a Mac.