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.
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
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.
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 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 ?
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 =)