Download

Preferred way to start a new project with C++ coding support?

After going through the tutorials and experimenting I found that the Visual Studio project solution structure varies depending upon which version of the Unreal editor that you use to create the new solution.

In the first scenario, I downloaded the source code for the engine, built it, ran the unreal editor from the built code and created a new “Code Side Scroller C++” project. This created a solution that included two projects; one for the Unreal Engine itself and one for my Game code. The .h and .lib references were pointed to the location of the engine source code folders.

In the second scenario, I just started the Unreal Engine that was installed from the .msi that I downloaded from Epic. When I run this version of the editor and create a new “Code Side Scroller C++” project, the resulting Visual Studio project structure is different. It does not contain a project for the Unreal Engine…it only contains a project for my Game code. In this case, the .h and .lib files are referenced from the install directory of the Unreal Engine.

My question is what is the preferred way to create a new solution if you know you will be adding C++ code? What are the advantages and disadvantages of each approach above?

There is no neither advantages or disadvantages. Binaries downloaded via Unreal Engine Launcher, using .msi installer you’ve mentioned, does not contain any source code of the engine, just header files and libraries, so there is no VS project, because you can’t build it.

So if we plan to edit the engine we should start our projects from the compiled source but if we want to only add game code we can start our projects from the installed editor? Is this correct?

pretty much, if you don’t plan to make any change to the engine itself you’re better off just using the installed version. having the source also makes it so you don’t have to wait for epic if you encounter a bug with the engine, you can just get to the root of it yourself.