Moving UE engine source repo to other drive

I cloned the UE4 C++ source from the github repo to my C: drive. After compiling and building, with the Intermediate folder, my UE4 repo folder is now 52.8 GB on C, which is unacceptable omgwtfbbq.

My projects are on D:. How can I also move the UE4 source repo (except the UE4 engine Build) to D:?

I don’t use/have the Epic Games Launcher, so this should be doable from within Visual Studio, right?

Basically I want to compile the engine to C, but have the engine source and the projects in D.

My project structure in VS:

112139-ue+structure.jpg

Hello Tudor,

I believe one thing that might be confusing you is that Games folder. The Games folder is just for the projects that are being built from inside of the Engine’s directory and aren’t being stored elsewhere.

If a project is inside of the Engine directory and contains code, it will not get its own Visual Studio solution file (.sln) as a project usually would, it will just become part of the UE4.sln file. The projects listed under Games are this way, but this isn’t required to use a project with a source build. If you create a project elsewhere, it can still be compiled with the editor, it just won’t be shown from inside of the UE4.sln file and will get its own .sln. This means that you can put your projects anywhere and be fine.

As for splitting the source from the rest of the engine, this isn’t possible as far as I know, as the structure needs to be maintained. I would suggest placing all of it on your D drive. That is what we do here in-house and we don’t really notice much difference in performance when comparing to Binary builds that we have on our C drives (SSD).

I see. In my case my project already is on a different partition, and has a .sln. But my UE4 is compiled from source, which is probably why UE links the source to the game. But I’ll just cut UE to a different partition then. Was under the impression that will break stuff.

No, something’s wrong. I unloaded everything except my Game project in Visual Studio. Then I selected Build → Project Only → Build Only MyProject and it seems it’s still trying to build the whole engine. Because (due to some other unknown issue) I get this error:

Error MSB3075 The command "C:\Repositories\Unreal_Engine_4\Engine\Build\BatchFiles\Build.bat MyProject Win64 Development "D:\_UE4\MyProject\MyProject.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command. MyProject C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 37

Isn’t Build.bat meant to compile the engine? Or is it meant to compile the project only. If so, then why do I get the rights issue? The editor is closed, all processes that could possibly access that file are closed AFAIK

If the editor has been modified or if the project files for it have been regenerated since the last time it was built, it’s going to require needing to be built again before you’ll be able to compile your project if the project is on that engine. The project depends on the engine at this point and dependencies must be built first.

Unless you use Rebuild, Visual Studio should skip anything that is considered “Up to date” and build anything else that is required to build MyProject. You can see an example of this when building the UE4 project directly, as things such as UnrealBuildTool and ShaderCompilerModule also get built as they are dependencies.

Build.bat is a batch file used to kick off UnrealBuildTool.exe, which is used when building anything in the engine. You can find more information about that here.

Are there any other errors in your output log other than this? Are you running Visual Studio in Administrator on an Administrator account on Windows?

Thanks for the info. Didn’t have other errors, tried VS in administrator. The Code 5 error comes after I compile successfully with a bug that crashes the editor. I think it goes away every time if I fix the problem and rebuild everything.

The thing is every time I go to Project Only > Rebuild Only MyProject, it recompiles ALL OF THE THINGS. It takes 60 minutes with 4 threads at 100% to rebuild the whole engine. W H Y?

Can I see somewhere what dependencies are there? It’s just a new 3rd person demo project.

[EDIT] I found this post which may solve the problem: Why rebuild the entire UE4 when I build my project? - C++ - Epic Developer Community Forums I’ll give that a try.