diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs index 9f4869aaa..8b68b516d 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs @@ -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); } }