Преглед на файлове

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

Harald Csaszar преди 3 години
родител
ревизия
4b4e96b788
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs

+ 4 - 4
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);
 				}
 			}