more verbose logging on meshcompression

This commit is contained in:
Lillith Rose (Device: Lucia) 2025-06-29 21:56:20 -04:00
parent 0a51612fbf
commit f337179794

View file

@ -51,16 +51,21 @@ namespace gay.lilyy.MeshCompression
if (mesh == null) continue; if (mesh == null) continue;
var localConfig = renderer.GetComponent<MeshCompressionConfig>();
var effectiveConfig = localConfig != null ? localConfig : defaultConfig;
if (effectiveConfig == null) continue;
var path = AssetDatabase.GetAssetPath(mesh); var path = AssetDatabase.GetAssetPath(mesh);
if (string.IsNullOrEmpty(path) || !path.EndsWith(".fbx", System.StringComparison.OrdinalIgnoreCase)) if (string.IsNullOrEmpty(path) || !path.EndsWith(".fbx", System.StringComparison.OrdinalIgnoreCase))
{
if (localConfig != null) Debug.LogError($"[NDMF] Could not find FBX for {renderer.gameObject.name}");
continue; continue;
}
var importer = AssetImporter.GetAtPath(path) as ModelImporter; var importer = AssetImporter.GetAtPath(path) as ModelImporter;
if (importer == null) continue; if (importer == null) continue;
var localConfig = renderer.GetComponent<MeshCompressionConfig>();
var effectiveConfig = localConfig != null ? localConfig : defaultConfig;
if (effectiveConfig == null) continue;
var targetCompression = GetTargetCompression(effectiveConfig); var targetCompression = GetTargetCompression(effectiveConfig);
var unityCompression = GetCompression(targetCompression); var unityCompression = GetCompression(targetCompression);