Download

Every time I rebuild my game against engine source, engine is being rebuild as well.

Just like the thread says.

Is there a way to build sources from github in away, where I wouldn’t need to rebuild them everytime I decide to rebuild my game sources ?

It’s pretty annoying, sometimes I want to rebuild my game, but that also means I need to rebuild entire engine, and that can take a while. Obviously launcher builds do not suffer from it, so I guess there must be some way to do it with github as well.

This works for me.

Thanks, but it is exactly at the point where I’m now.

I want to rebuild game code, but don’t want to rebuild engine along it.
Incremental build works on game.

I’ve noticed that starting the debugger doesn’t cause the full engine rebuild. Definitely not a solution, but it might get you moving back towards the mythical 5s rebuild.

The problem is that when you need to rebuild your game UBT cleans the engine and editor along and thus rebuilds everything. If you are forced to rebuild your game code you’d go to manually delete the Binaries and the Intermediate under your games project directory, and then recreate the project files. I think you dont have to close VS for that, just reload the solution when the project files are fully regenerated. Then the games object and binary files are quite clean now, and you can safely Build them instead of rebuild everything.

I havent found any better way and if someone knows, please share :wink:

Build Only Project With Single Key Press

I build just my project all day long using a custom github engine version, with a single key press!

:slight_smile:

Here’s what I’ve been doing since the Beta, it works great for me!

I wrote a wiki on this months ago!

Build Only Project With Single Key Press
https://wiki.unrealengine.com/Build_Current_VS_Project_With_Single_Key_Press

Summary: You have to bind the VS action Build Only Project

I use the F12 key cause I dont search for stuff within VS


**Focus**

Make sure that you have a project file open and click on it to give it focus before using your keybind!

For this reason I always have the Build.CS open for my project .sln

Good luck!

Result

I just press F12 whenever I want and only my project code is built!


**Pic**

Here's a pic!

![VSOnlyProject.jpg|1262x823](upload://3wzzMWJSgdfUIdXzw4SbgCvdeG.jpeg)

Rama

@Rama

=\ Rebuilding with a single keypress isn’t really the issue. We are trying to cut down on compilation times b/c the full engine, editor and such are wiped with each build too. It would be optimal if we could focus on the game module itself and not have it require the other projects.

I’m not sure what you mean by Game Module, as different than what I wrote above about rebuilding just my game module / project all of the time, just by itself?

I rebuild just my game all the time and the editor and such are not getting rebuilt.

The focus of my tip above was not just rebuilding on keypress, it was about rebuilding only your game module and not the entire engine, that’s what BuildOnlyProject does :slight_smile:

I’d be happy to help out if I could follow the issue you are having better :slight_smile:

**Perhaps I can say what I think you’re saying and you can correct my interpretation as needed
**
You are saying

  1. When we make changes to our game code in our C++ UE4 project,
  2. Using the Github version of the engine, then
  3. The entire engine gets rebuilt each time we make changes to our game code.

If that’s what you’re saying my tip above is the solution I used, BuildOnlyProject does not build the entire engine, just your game module.

Are you saying something different?

:slight_smile:

Rama

PS: I’m just trying to help out, hope my tone is clear :slight_smile:

Hi Rama,

the issue is when you Rebuild your project (the “re-” part is the culprit), the engines editor target gets cleaned and rebuild along with the games object and exe files. So automatic cleaning of just the games project isnt sensible.

Building the game project (without “re-” :slight_smile: ) is working just fine, as you point out in your tutorial and as your answer.

So if something goes wrong with building, as with inside’s build, he has to clean it manually. Not exactly difficult but not a great workflow. F.e. my computer isnt the fastest, if I have to rebuild Im bound to wait ages.

PS saw your edit. I gonna try if the command “Build only project” does it.

Rama I just issued the command you suggets, it issued a full rebuild of UHT and started now 1265 targets for the game, not just the few game sources. Pitty, now I have to wait for it to complete. lol

Perfectly clear. Sorry about that, my head must have been foggy over the weekend when i was looking at it.

Your fix works about the same, although it does appear to only target the game project, so that’s good. I was using Build > Build Project, so now i have a hot key for it. Ill keep pushing for better compile times, but i think this is a fix.

Full solution build with only game changes:
UBT execution time: 20.44 seconds

v.

Building my game project with only game changes:
UBT execution time: 17.00 seconds

Yay!

Hope you’re having fun Bob Gneu!

:slight_smile:

Not sure exactly what you are doing or what you mean, but keep in mind the following:

  1. If you have not recently compiled your project it will take a long time, successive builds using Build Only Project will be faster. Especially true after logging off or restarting computer.

  2. If you change .h files you will have longer compile times. Cpp-only is really really fast by comparison

  3. 4.5 is coming

Rama

Oh Im sorry if I wasnt clear. English is not my first language, so my excuses if I got it wrong or overly complex.

So I just try again, simple and easy, so everybody understands it right.

Build Project -> Builds the game projects changed files.

Rebuild Project (Rebuild Selection keyboard command as Rama suggested) -> Rebuilds the Engine, Editor and Game, just all of it. The difference for me is far more then 3 seconds (or 300, whatever that point means, thousands separators, decimal point and number grouping are not the same everywhere).

Thats with any version including 4.5 Preview, and thats the unwished behaviour some of us dont want. What inside askes for as far as I understand, and what I would find very convenient, would be that if you rebuild the game project, that it cleans and build just that project, and not anything else.

Might be helping to deselect the engine targets from the solution configuration to achieve that but Im not going to start another rebuild just now.

I hope this is easy to understand and clear. Maybe I did misunderstand something and beeing getting off topic, but I dont think I am.

I never suggested using rebuild project!

I said use the hotkey command for Build Only Project

there’s a big difference there!

Rebuild Project will do as you are experiencing, but Build Only Project will do what is actually working for me and many others!

See my picture above for details!

:slight_smile:

Rama

I believe that that is exactly his problem. He is having no trouble building just the project, hotkey or otherwise. That works fine.

The problem is that the rebuild command triggers what would be a full solution rebuild rather than localized to the project, but only if the engine is included in the generated solution.

The best solution I can think of, beyond fixing UBT (because I do consider this a bug, personally), would be to add an extension for VS to do the localized clean yourself, and just stick to build rather than rebuild.

Indeed, thx RPotter, that is it.

I am confused as to why I never have this problem.

Mikand79 please try the following:

  1. delete your .sln, .suo, and .sdf

  2. delete your Intermediate folder

  3. right click on .uproject and say “switch engine version” and pick your github engine

Does the new .sln that is generated via this method have your engine as part of the solution file? or does it show just your project?

I am using a github engine and I do not see the UE4 Engine as part of my solution file at all.

When I go to build the engine I do it in a completely different solution that is in my github engine install directory.

So I have never experienced this rebuild issue that the two of you are discussing :slight_smile:

Rama

Maybe you never clicked Rebuild ?

Right click on your game project, which is build against GitHub. Then Click Rebuild on it.

Have fun rebuilding entire game + engine (;.

I have clicked rebuild before, and that’s why I avoid doing it :slight_smile:

but what is confusing me is that I’ve never needed to do that!

I use this workflow

  1. Build only project when using the .sln for my individual game project (as I describe in this thread)

  2. Go to the .sln for the Engine in my Github installation folder to rebuild the engine after making engine changes

I’ve never had any of the problems being described in this thread using the above work flow!

And I work on my github engine based game every day! It is an entirely C++ Based game so I am compiling it it many times a day with no issues

Rama

I’d have to check the checkin history, but I think they might have changed the default arguments when generating projects. If someone here is still generating projects, they can use this commandline instead to generate them:

<EnginePath>/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="<UProjectPath>" -game -progress

What happens with the engine projects is that by default on your system, it is adding the -engine option when you do the generate project files.

Later today, I’ll did into the UBT code a bit and see if the defaults are stored somewhere.