mirror of https://github.com/tuyoogame/YooAsset
Update DefaultBuildinFileSystemBuild.cs
parent
51f2709956
commit
caf072ed9b
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
internal class DefaultBuildinFileSystemBuild : UnityEditor.Build.IPreprocessBuildWithReport
|
public class DefaultBuildinFileSystemBuild : UnityEditor.Build.IPreprocessBuildWithReport
|
||||||
{
|
{
|
||||||
public int callbackOrder { get { return 0; } }
|
public int callbackOrder { get { return 0; } }
|
||||||
|
|
||||||
|
@ -90,7 +90,8 @@ namespace YooAsset
|
||||||
foreach (var fileInfo in fileInfos)
|
foreach (var fileInfo in fileInfos)
|
||||||
{
|
{
|
||||||
if (fileInfo.Extension == ".meta" || fileInfo.Extension == ".version" ||
|
if (fileInfo.Extension == ".meta" || fileInfo.Extension == ".version" ||
|
||||||
fileInfo.Extension == ".hash" || fileInfo.Extension == ".bytes")
|
fileInfo.Extension == ".hash" || fileInfo.Extension == ".bytes" ||
|
||||||
|
fileInfo.Extension == ".json")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string fileName = fileInfo.Name;
|
string fileName = fileInfo.Name;
|
||||||
|
@ -110,7 +111,11 @@ namespace YooAsset
|
||||||
|
|
||||||
UnityEditor.AssetDatabase.CreateAsset(buildinFileCatalog, saveFilePath);
|
UnityEditor.AssetDatabase.CreateAsset(buildinFileCatalog, saveFilePath);
|
||||||
UnityEditor.EditorUtility.SetDirty(buildinFileCatalog);
|
UnityEditor.EditorUtility.SetDirty(buildinFileCatalog);
|
||||||
|
#if UNITY_2019
|
||||||
|
UnityEditor.AssetDatabase.SaveAssets();
|
||||||
|
#else
|
||||||
UnityEditor.AssetDatabase.SaveAssetIfDirty(buildinFileCatalog);
|
UnityEditor.AssetDatabase.SaveAssetIfDirty(buildinFileCatalog);
|
||||||
|
#endif
|
||||||
Debug.Log($"Succeed to save buildin file catalog : {saveFilePath}");
|
Debug.Log($"Succeed to save buildin file catalog : {saveFilePath}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue