5.6 - MetaHuman Plugins Explicitly Not Included in Project But Compile Anyway

Hello!

TL;DR

Before upgrading to 5.6 our process below worked completely fine. In our 5.6.1 source project, no matter how we exclude MetaHuman plugins from our project and its plugins, MetaHuman is still being compiled every single time after deleting the project’s Intermediate. UBT seems to be relying on the UnrealEditor.uhtmanifest in the project’s Intermediate folder to determine if it should build MetaHuman and not MetaHuman’s various modules’ Intermediate directories.

  • Project Configuration is Correct: pproj.uproject and all project plugin being compiled properly disable all MetaHuman plugins in their .uplugin files
  • No Direct Dependencies: Zero MetaHuman references found in project or its plugin source code or Build.cs files
  • Engine-Level Inclusion: UnrealEditor.uhtmanifest shows there are 40+ MetaHuman modules being processed by UHT despite being disabled

We noticed that Engine\Source\Programs\LiveLinkHub\Source\LiveLinkHub.Target.cs does default to enabling MetaHumanLiveLink which does list MetaHumanCoreTech as a plugin dependency.

What can we do, aside from removing MetaHuman’s files to ensure that MetaHuman is not being built every time one of our plugins and its dependencies gets built? This is killing our validate times.

Our Setup

Our source 5.6.1 project consists of a main source project and multiple source plugin projects. We have a plugin build pipeline that we use for validates. We’ve been using this pipeline since 5.0 and after updating to 5.6 it seems that MetaHuman plugins compile no matter what. Neither our project nor our plugins has any dependencies on MetaHuman at all and we explicitly disable all MetaHuman plugins in our .uproject file.

Steps in Our Build Process

1. Sync Source Code (P4)

2. Generate Project Files

  • Create a temporary uproject (pproj.uproject) in a temp directory. The uproject is configured with enabled plugin dependencies and explicitly disabled MetaHuman plugins
  • Create file system junctions linking plugin dependencies from their code stream locations
  • Set up the project structure required for building

[Image Removed]

3. Build Plugin

We execute:

\\Engine\\Build\\BatchFiles\\Build.bat UnrealEditor Win64 Development - nocompileeditor r:/temp/pproj/pproj.uproject -WaitMutexNow the folder looks properly like this:

[Image Removed]

This triggers a build of the plugins defined in the .uproject (intended) as well as MetaHuman source files (unintended).

4. Build Again Right Away

  • Without deleting Intermediate build again with the same command.
  • Nothing builds, as intended

5. Delete Intermediate and Build Again

The plugins do not build since they have their own Intermediate folders however notice that all the MetaHuman source files build again.

And a look at the UnrealEditor.uhtmanifest in Intermediate shows why: there are 40+ MetaHuman modules being processed by UHT despite being disabled in my project’s

pprop.uproject.

I don’t understand how MetaHuman source files (and only those) are being built by our project when we not only don’t use anything to do with MetaHuman but excplicitly disable them in our uproject/uplugin files.

Thanks again for any insights!!

Hi,

I’m not sure how this changed in UE 5.6, but after debugging and trying a couple of things, I believe this comes from the target you are using. I was able to reproduce you issue using the ‘UnrealEditor’ target and your command. But when I was building from VS, I noticed that I build significantly less modules. So I took a look at the command emitted by VS and figured out that if you use the project specific Editor target, Test56Editor in my case, instead of ‘UnrealEditor’ target, it correctly apply the modules disabled from the Test56.uproject: So this command for the ‘Test56’ project:

.\Engine\Build\BatchFiles\Build.bat Test56Editor Win64 Development "D:\Proj\Test56\Test56.uproject" -WaitMutexOr the equivalent invocation:

.\RunUBT.bat -Target="Test56Editor Win64 Development" -Project="D:\Proj\Test56\Test56.uproject" -WaitMutexBoth commands build the Editor but skip the MetaHuman and Bridge plugin according to the Test56.uproject file. When I use “UnrealEditor” instead of “Test56Editor” in the command, then it builds all the MetaHuman plugins along with many others that I don’t build using Test56Editor. I debugged but I was not able to confirm that ‘UnrealEditor’ target is special and just build a superset of plugins, but that’s probably it. Also, as far as I’m aware, the -nocompileeditor argument in that context does nothing. I didn’t find/notice how/when it was used. It would be strange to ask to compile the Editor target and ask to not compile it. So this makes sense to me.

There is also a mode in UBT that you can use to visualize all modules dependencies. It stills shows the modules from the plugin you have disabled, but it gives you the full list of dependencies. If cleaned everything, build, then run the command below running the command below, you will be able to see which modules gets compiled by looking at the module binary size.

.\RunUBT.bat -project="D:\Proj\Test56\Test56.uproject" UnrealEditor Win64 Development -Mode=AnalyzeFor example, using your list .uproject file excluding the Bridge plugin (that pulled some MetaHuman modules) in my Test56.uproject, I verified that the Bridge plugin was not compiled (Binary Size: 0kb) in D:\Proj\Test56\Binaries\Win64\UnrealEditor.txt by using the command line above.

Module:                  "Bridge"
Shortest path:           allmodules option -> Bridge.uplugin -> Bridge
Unique inward refs:      0
Unique outward refs:     2 (MegascansPlugin, WebBrowser)
Recursive inward refs:   0
Recursive outward refs:  395 (AIGraph, AIModule,..., zlib)
Object size:             0kb
Object files:            
Binary size:             0kb
Binary files:            UnrealEditor-Bridge.dll

Regards,

Patrick

Just after posting, I just saw my command line and noticed it was using the ‘UnrealEditor’ target.

.\RunUBT.bat -project="D:\Proj\Test56\Test56.uproject" UnrealEditor Win64 Development -Mode=AnalyzeSo I changed it to use the “Test56Editor”:

.\RunUBT.bat -project="D:\Proj\Test56\Test56.uproject" Test56Editor Win64 Development -Mode=AnalyzeAnd this time, in my “D:\Proj\Test56\Binaries\Win64\Test56Editor.txt”, I don’t see any MetaHuman or Bridge modules anywhere. So I conclude that the UnrealEditor target builds a superset of plugins that are not controlled by the .uproject file.

Regards,

Patrick

[mention removed]​ Thank you for this, I can confirm that this does reduce the issue of build action counts, even WITHOUT the explicit plugin exclusions. So, I was able to verify with only included plugins.

I had peeked at it before, but potentially it’s because UnrealEditor target uses bBuildAllModules = true; That said, we have other modules that are in the manifest, yet don’t rebuild.

Another thing I noticed was, Metahuman.uplugin within the engine is missing EnabledByDefault: false.

EDIT: Still need to verify that this works in our overall ecosystem, and if it does… we will accept this answer.

It’s good to know that the issue is now under control! When I investigated, I also noticed that Metahuman.uplugin was missing EnabledByDefault: false, but I read in a internal Slack thread that ‘false’ was the default value if EnabledByDefault was not set. I just accepted that as the truth because it is the sensible default. Regarding the UnrealEditor target, bBuildAllModules = true is most likely the reason as it match my expectations. Let us know if something else comes up.

Regards,

Patrick

Thanks, [mention removed]​ very much appreciate the quick and thorough response!