Getting myself better acquainted with baking and think I've noticed a bug in code that stops error logging on synchronous subscene baking
Entities 1.3.2
AssetDependencyTracker.cs:215
// <--- Expects hasFailedArtifacts to be true on failure
var hasFailedArtifacts = AssetDatabaseCompatibility.ProduceArtifactsRefreshIfNecessary(allSync.AsArray(), _AssetImportType, _ArtifactCache);
Following this code, invalid artifacts returns false
foreach (var artifact in artifacts)
{
if (!artifact.isValid)
return false; // <------- returns false on hasFailedArtifacts
}
So the original code logging never runs on an invalid artifact
// ...
if (hasFailedArtifacts) // <------- making this check inverted so the below error logging never runs
{
LogDependencyTracker("Failed Sync artifacts");
for (int i = 0; i != allSync.Length; i++)
{
if (!_ArtifactCache[i].isValid) // <--------- will never pass as only successful gets here
Debug.LogError(
$"Asset {AssetDatabaseCompatibility.GuidToPath(allSync[i])} couldn't be imported. (Most likely the assets dependencies or the asset itself is being modified during import.)");
}
}