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

This commit is contained in:
Harald Csaszar 2022-09-27 20:38:33 +02:00
parent 965e3c982d
commit eb7bf3a8b3

View File

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