From caf072ed9b7d8e339683d9ebcb08d4b5f2fc4e11 Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 31 Jul 2024 12:02:07 +0800 Subject: [PATCH] Update DefaultBuildinFileSystemBuild.cs --- .../DefaultBuildinFileSystemBuild.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystemBuild.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystemBuild.cs index 367148c..7b1e000 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystemBuild.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystemBuild.cs @@ -5,7 +5,7 @@ using UnityEngine; namespace YooAsset { - internal class DefaultBuildinFileSystemBuild : UnityEditor.Build.IPreprocessBuildWithReport + public class DefaultBuildinFileSystemBuild : UnityEditor.Build.IPreprocessBuildWithReport { public int callbackOrder { get { return 0; } } @@ -90,7 +90,8 @@ namespace YooAsset foreach (var fileInfo in fileInfos) { if (fileInfo.Extension == ".meta" || fileInfo.Extension == ".version" || - fileInfo.Extension == ".hash" || fileInfo.Extension == ".bytes") + fileInfo.Extension == ".hash" || fileInfo.Extension == ".bytes" || + fileInfo.Extension == ".json") continue; string fileName = fileInfo.Name; @@ -110,7 +111,11 @@ namespace YooAsset UnityEditor.AssetDatabase.CreateAsset(buildinFileCatalog, saveFilePath); UnityEditor.EditorUtility.SetDirty(buildinFileCatalog); +#if UNITY_2019 + UnityEditor.AssetDatabase.SaveAssets(); +#else UnityEditor.AssetDatabase.SaveAssetIfDirty(buildinFileCatalog); +#endif Debug.Log($"Succeed to save buildin file catalog : {saveFilePath}"); } }