What causes "excluded from unity build"?

I’m using wwise and I’ve noticed in the last few months, my compile times suddenly got a lot longer.

Every time I compile, I get the following message:

2>[Adaptive unity build] Disabling PCH for excluded files. Set bAdaptiveUnityDisablesPCH to false in BuildConfiguration.xml to change this behavior.
2>[Adaptive unity build] Excluded from AkAudio unity file: AkAcousticTexture.cpp, AkAmbientSound.cpp, AkAudioBank.cpp, AkAudioEvent.cpp, AkAudioInputComponent.cpp, AkAudioInputManager.cpp, AkAudioModule.cpp, AkAudioStyle.cpp, AkBankManager.cpp, AkCustomVersion.cpp, AkGameplayTypes.cpp, AkReverbVolume.cpp, AkSpatialAudioVolume.cpp, AkSpotReflector.cpp, AkSurfaceReflectorSetComponent.cpp, AkWaapiCalls.cpp, AkWaapiFieldNames.cpp, AkWaapiFieldNamesCustomization.cpp, AkWaapiJsonManager.cpp, AkWaapiUri.cpp, AkWaapiUriCustomization.cpp, AkSSlider.cpp, AkBoolPropertyToControlCustomization.cpp, AkCheckBox.cpp, AkItemBoolProperties.cpp, AkItemProperties.cpp, AkPropertyToControlCustomization.cpp, AkSlider.cpp, AkWwiseObjectDetailsStructCustomization.cpp, AkWwiseTree.cpp, ... (continues for another 50+ files)
  • What might be causing this?
  • Does this make compile time slower like I suspect?
  • How can I fix it? It mentions buildconfiguration.xml but that seems to be superceded by Build.cs
  • The setting for PCH I have in my ModuleRules is PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

I find that if you have the files modified then they get excluded. I assume that this makes the incremental build times much smaller while maintaining main performance win of the unity build system.

Do you have a bunch of writable files?

Yes they’re writable, but they haven’t been changed.

You think Unreal checks whether a file is writable or not, rather than whether the file has been changed or not?

I’m not sure the rules as I only just noticed this. With git as source control there’s a print out saying using git status, in perforce I’m not sure. Fallback might be file modification times but then I’m not sure what criteria it uses to decide to fallback to a full unity build again.

Worst case you can probably do a clean build to reset everything.