Parcourir la source

[unity] Fixed excessive UnloadingUnusedAssetsImmediate during build. Initially created to avoid out of memory exceptions, can now be disabled via preferences. Closes #2160.

Harald Csaszar il y a 3 ans
Parent
commit
eb7bf3a8b3

+ 2 - 2
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineBuildProcessor.cs

@@ -98,8 +98,8 @@ namespace Spine.Unity.Editor {
 #endif
 #endif
 						prefabsToRestore.Add(assetPath);
 						prefabsToRestore.Add(assetPath);
 					}
 					}
-					EditorUtility.UnloadUnusedAssetsImmediate();
 				}
 				}
+				EditorUtility.UnloadUnusedAssetsImmediate();
 				AssetDatabase.StopAssetEditing();
 				AssetDatabase.StopAssetEditing();
 #if !HAS_SAVE_ASSET_IF_DIRTY
 #if !HAS_SAVE_ASSET_IF_DIRTY
 				if (prefabAssets.Length > 0)
 				if (prefabAssets.Length > 0)
@@ -147,8 +147,8 @@ namespace Spine.Unity.Editor {
 #if HAS_SAVE_ASSET_IF_DIRTY
 #if HAS_SAVE_ASSET_IF_DIRTY
 					AssetDatabase.SaveAssetIfDirty(atlasAsset);
 					AssetDatabase.SaveAssetIfDirty(atlasAsset);
 #endif
 #endif
-					EditorUtility.UnloadUnusedAssetsImmediate();
 				}
 				}
+				EditorUtility.UnloadUnusedAssetsImmediate();
 				AssetDatabase.StopAssetEditing();
 				AssetDatabase.StopAssetEditing();
 #if !HAS_SAVE_ASSET_IF_DIRTY
 #if !HAS_SAVE_ASSET_IF_DIRTY
 				if (spriteAtlasAssets.Length > 0)
 				if (spriteAtlasAssets.Length > 0)