Problem: The engine compiles every time we do changes to our project

Hello everyone. We are a bunch of hobbyists having trouble building our project with c++ . Every time we do simple changes to our project’s source code and press the build button, the engine is recompiled. This issue is too time consuming.

Here is our setup:

-UE4 is compiled on an external hard drive.

-We are using visual studio 2013 express.

-Our system meets required specs.

  • We already read about UnrealVS but it doesn’t work on VS express.
    Thanks for reading.
1 Like

Have you tried just right-clicking on your project and selecting “Build”? That’s what I do and it works fine.

We tried this ; however, VS starts building unreal header tool and continues to build the engine. For some reason VS is not even checking if the files are up to date. Any suggestions?

I had the same problem ,now when i create a new project it takes 30min first comple ,then after 30sec to 2min in function of changes made , right click -build only - project , after for small changes i use editor to compile 1 min max in my case

Thank you for your replies. For any body facing this problem, right click your project and rescan . For some reason the projects are not being scanned automatically.

Might that have something to do with the external drive?

Maybe, at least we know that we have to rescan the project on start up if it doesn’t do so on its own. thanks for the suggestion I’ll try it later if I happen to find 12GB of space on the internal drive. :slight_smile:

I’ve got a 256GB Samsung 840 Pro devoted to UE4. Gotta love the build times.

Totally. :cool:

Don’t put your game project into the UE4 solution. Open up the editor and create a new project then work in that minor project. You have access to the same tools, and unless you are actively modifying the engine its not necessary to work that way.

I’m having the same problem. Just to make sure do I just need to rescan my project folder only? (i.e I don’t need to rescan or “rebuild” the Engine everytime I’ve changed code to my game project?)

Yes rescan the project. If that doesn’t work rescan the UE4 project too. You have to do this every time you open the solution. You don’t need to rebuild the engine.
Good Luck!!

I have same bug, and i it started since yesterday.
So i have started other thread, but after that found that one
UE 4.0.2 build tool makes me crazy :( - Feedback & Requests - Epic Developer Community Forums(

so, it is more VS issue that UE?

One of the options you can pass to GenerateProjectFiles.bat is -engine (which the description says includes the engine files with the project files). You might want to try dropping that command.

edit: oops, I meant to reply to h2o’s topic.

This trick (How to improve compile times for a C++ project? - Programming & Scripting - Unreal Engine Forums) works for me. I simply followed the ‘intro to programming’ video. This placed my project within my full source project. Afterwards, I found that thread and updated my build.cs file. By default, your project is configured for a huge C++ project so it can combine all the C++ files. For early stages of the project you want to make this change

My compile times is probably around 30 secs or so after Windows caches everything. Editor-Development-64bit starts up less than a minute. And this is without an SSD drive.

[edit] Actually the issue reported by the OP is different. Sorry yo

1 Like

i have the same problem, can anyone help me ?

I don’t understand why it even recompiles entire engine for every new project! Is not that enough compiling the engine once it’s updated?
Why not to build the game shared libraries and than link them with the engine?

I build from source too and this is what I figured. It doesnt need to rebuild the engine along with your project, even for the first build of a new project. Just build the engine in Development - Win64 and Development Editor - Win64 (or any other matching set) once (without your game, from its own solution). Create your project, open it in Visual Studio and switch the startup project to your game. Change Solution Configuration to match the configuration you built the editor with (f.e. Development Editor - Win64). Now take care that when you build your game, that you really do that, Build it, not rebuild it. It won’t compile the engine/editor project then. If you happen to clean the solution or hit rebuild by mistake go take a walk or whatever, because Visual Studio is going to delete and rebuild the editor in the engine source location. Im now psycho about not hitting accidentially anything in UE4 game projects what I used to do often with other projects, that is clean and rebuild. Clean by hand, if you know which files cause trouble with building and need to be cleaned.

Another thing I saw is that stopping a build in Visual Studio doesnt neccessarily mean the build process stops. Even if Visual Studio looks like it did, the Unreal Build Tool and the child cl.exe processes keep running. I dont know if they keep running for their actually sources and then stop or if it keeps build the rest in the background, but I kill them anyway by hand if that happens, as I doubt starting another build on top of it is meaningful or harmless.

If you going to package, the editor or the frontend are going to rebuild the engine (but not the editor) and your code if it sees fit (and I think it almost(?) always does).

My question would be can you exclude the engine source code from the generated solution to be like a project bound to the launcher version of the engine? So that those accidentially rebuild and all the grief and tears dont happen :wink: ?

I guess Unreal Build Tool doesn’t care about the Visual Studio solution. The “Build” command, as it is declared in the project properties, invokes UBT with no argument telling which VS project to build (it passes the path the the *.uproject file).
What really affects compilation time is bUseUnityBuild property of BuildConfiguration class. It dramatically decreases compilation times in case of small changes to the sources.
I will try to repeat the sequence you offered and reply later.
Thank you for the response =)

You are right of course, and if you change the engine along with your game often the bUseUnityBuild settings are the way to go. Though first build is horrible without unity :wink: