more verbose logging on meshcompression
This commit is contained in:
parent
0a51612fbf
commit
f337179794
1 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue