Compile and run without Editor


When in Visual Studio, I can choose for the Development compilation target, without the Editor, but when I do this I get an error about missing cooked content files. I’ve googled around and got solutions like these:

But their answer is to simply use the Editor build, which is exactly what I’m trying to avoid.

If I google cooking content I get this page in the documentation:

But I can’t get this command to work, it tells me:

“Failed to open descriptor file 'F://Program Files/Unreal Engine/4.7/Game/Game.uproject”

Obviously that file does not exist, but why is it searching there instead of in my current directory? The documentation says nothing about how to setup the environment for invoking the UE4Editor.exe command. I had to figure out where it was myself.

Perhaps I’m going at this the wrong way. I’m getting so frustrated with constantly having to deal with the editor, I just want to hit F5 and launch my game.

Add -game to the command arguments for launching. This will run the game version of the editor (basically what the editor does when you pick Play > Standalone Game) which does not require cooking content.

Or you can use UnrealFrontend to cook your game files and then specify your staged build directory as a working directory inside of your project’s properties.

Thanks! I added -game to the command line configuration in the debugging menu of the project properties, now it skips the editor. It’s still a bit slow but faster than it was before.

I’m not sure how to go about using UnrealFrontend to cook my game files, but I’ll research that and see if that makes it faster.

the -game option will just skip loading editors UI and run the game from editor anyway. also it won’t compile the code. you would still need to build the whole editor (without the -game option) to recompile your code.

the question remains open. how to compile the game directly, no the editor.

because actually it takes a lot of time to load every time you want to recompile just a single .cpp file.