Does anyone know how to get Visual Studio Codeto work with UE4?
I have not found any documentation on this.
Hi KinDaKreator,
Unfortunately Unreal Engine 4 does not currently support Visual Studio Code. The Engine looks for an installation of the full Visual Studio IDE, so you would need to be using either Express (for Windows Desktop), Community, Professional, or Enterprise.
To tell the truth, Visual Studio Code at the time Iām writing this has not even got full C++ supporto (aka there is no Intellisense yet). It would be awesome to be able to work with VSCode on Mac, though. Is there any you guys at Epic will be adding something to support VSCode or any other IDE that isnāt Xcode?
Iām answering my own question. You can use the YouCompleteMe extension to add Intellisense. You will have to add the CLionSourceCodeAccess plugin to your project and let it generate the CMakefiles for you and youāre set. Pretty nice!
Cool. Thanks.
Bringing my response from another thread in here in hopes Epic Staff will see this:
"So, I think for people trying to convince their companies to use UE4 for internal projects or even as an alternative to Unity for commercial projects (where Unity has VS Code integration #handled already), this is a VERY significant ābarrier to entryā⦠you lose the ābut you donāt need to pay unity up-front license costsā argument if UE4 is tethered to an IDE that costs several times (thousands) more per-seat than the Unity license in the first placeā¦
I think this is an important feature for small (but not revenue-less) companies if they want to use Unreal. Being tethered to Visual Studio is a curse unless youāre a 5 man team w/ no significant revenue or a multi-million dollar corporation that can afford six-figure annual dev environment costs for your team.
Anyone from Epic have thoughts on this?"
I think the benefit to āsmallā companies would be huge and VS Code is actually a really powerful CROSS-PLATFORM editor, so there would be several benefits to providing support I thinkā¦
@spockTheGray third party plugins do provide support for VSCode which is free. Or you can use CLion if you already have a license for that or for the whole IntelliJ suite.
Itās not straightforward to setup but once you manage to do it the first time itās all there. Iāll see if I can add some auto setup stuff to the CLionSourceCodeAccess plugin to provide all the VsCode and YouCompleteMe files and options needed. That should make it even easier to get it up and running
Hrm, I might have to check out these plugins you speak of - but Iām not sure how this would work unless these plugins are UE4 plugins (not VS Code plugins, right?). Iām guessing you can just edit w/ VS Code and then build from Unreal Editor (the pre-compiled version)?
Yes, exactly. You code with VSCode and compile with Unreal Editor. Actually you could compile from within VSCode but thereās still something buggy in the CMakefiles definitions so it wonāt really work. But thatās something that might be solved with some clever work.
The CLionSourceCodeAccess plugin is an UE4 plugin so you add it to your Unreal Editor as usual. But you want to add the YouCompleteMe extension of VSCode as well if you want autocomplete to work. And itās a bit complicated to get it working as you need to go all the way to compiling and installing a VIM plugin to get everything working, but Iāve already done it a couple of times on different development machines, so thatās definitely doable.
Thanks for the info! Itās good to know that thereās at least a working alternative - Iāll keep this in mind. The only downside then, I think, you canāt use NVIDIAās Gameworks integrations (they have it integrated in the source on Github)⦠but at least this could get us working w/ pre-compiled UE4.
You probably have to wait for the next release to include Gameworks but thatās just part of using the pre-compiled engine vs the source code one. I guess you could actually make a few changes to the CLionSourceCodeAccess plugin to be able to use it with the source code version of UE4. That would require a bit of investigation, but Iām pretty sure itās doable.
Sorry but Visual Studio Community Edition is free (you just need to register with Microsoft to get tracked on their databasesā¦) and it has most of the Professional version features.
You can select VSCode in ue 4.18 as your preferred ide
Core Updates:
- Visual Studio Code can now be used to write code on Windows, Mac, and Linux. To use it, select āVisual Studio Codeā as your preferred IDE from the editor preferences dialog, or add the -vscode argument when generating project files on the command line.
Looks like you canāt compileā¦and when i try to open a file from UE 4.18.2 in VSCode, it opens an empty fileā¦itās supposed to be the projectā¦any ideas ?
You can currently use VSCode for UE4 projects, you can even launch the project (run debugging and run without debugging).
However, I cannot compile the project from VSCode (Terminal -> Run Build Task). The following error message appears:
The task stays running, until you delete it, the editor does not open:
Therefore I can only compile from within the editor (Hot Reload):
Has anyone managed to build a project from VSCode?
Well, I managed to compile/build the UE4 project from VSCode.
I have changed the configuration file, like this:
{
"git.ignoreMissingGitWarning": true,
"update.mode": "manual",
"update.enableWindowsBackgroundUpdates": false,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"terminal.integrated.shell.windows0": "C:\\WINDOWS\\System32\\cmd.exe",
"terminal.integrated.shell.windows1": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"terminal.integrated.env.windows": {
"VsDevCmd": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat\""
},
...
Where is this file located Helghast, also do you have Visual Studio installed on your computer for this to work ?