[unity] Minor import code refactoring, shall not change anything.

This commit is contained in:
Harald Csaszar 2022-05-24 17:17:20 +02:00
parent f26b12821e
commit 4b4e96b788

View File

@ -633,14 +633,14 @@ namespace Spine.Unity.Editor {
}
} else {
vestigialMaterials.Remove(material);
}
if (material != null) {
if (texture != null)
material.mainTexture = texture;
EditorUtility.SetDirty(material);
// note: don't call AssetDatabase.SaveAssets() since this would trigger OnPostprocessAllAssets() every time unnecessarily.
populatingMaterials.Add(material); //atlasAsset.materials[i] = mat;
}
if (material != null) {
populatingMaterials.Add(material);
}
}