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.
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.
The unity build uses the selected version control’s changelist (i.e the things you see listed in git status for git). See for yourself: Commit everything, and suddenly no file will be excluded.
It is NOT whether the file is writable, nor is it UE/UBT “guessing” anything. This is a much simpler/dumber system.
It makes sense that this would trigger eggregious behaviors in the case where you’ve started using a plugin: That’s a piece of code that will live in your project folder, but that you don’t want to commit. If you don’t cleanly setup your version control tool to ignore the wwise folder, it will force UE to keep assuming that you are in the process of modifying these plugin files.
Adding more context to already necroed but interesting topic
From the TargetRules.cs we can read:
/// <summary>
/// Use a heuristic to determine which files are currently being iterated on and exclude them from unity blobs. This results in faster
/// incremental compile times. For Perforce repositories, the current implementation uses the read-only flag to distinguish the working
/// set, assuming that files will be made writable by the source control system if they are being modified. For Git repositories, the
/// implementation uses the git status command. Source code archives downloaded from Git as .zip files are not supported.
/// </summary>
[CommandLine("-DisableAdaptiveUnity", Value = "false")]
[XmlConfigFile(Category = "BuildConfiguration")]
public bool bUseAdaptiveUnityBuild { get; set; } = true;
So it checks if file is writable, but only if you use Perforce as a source control.