mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
fix #623
This commit is contained in:
@@ -12,6 +12,11 @@ namespace YooAsset.Editor
|
||||
/// </summary>
|
||||
public ECompressOption CompressOption = ECompressOption.Uncompressed;
|
||||
|
||||
/// <summary>
|
||||
/// 从文件头里剥离Unity版本信息
|
||||
/// </summary>
|
||||
public bool StripUnityVersion = false;
|
||||
|
||||
/// <summary>
|
||||
/// 禁止写入类型树结构(可以降低包体和内存并提高加载效率)
|
||||
/// </summary>
|
||||
@@ -41,6 +46,8 @@ namespace YooAsset.Editor
|
||||
|
||||
if (ClearBuildCacheFiles)
|
||||
opt |= BuildAssetBundleOptions.ForceRebuildAssetBundle; //Force rebuild the asset bundles
|
||||
if (StripUnityVersion)
|
||||
opt |= BuildAssetBundleOptions.AssetBundleStripUnityVersion; //Removes the Unity Version number in the Archive File & Serialized File headers
|
||||
if (DisableWriteTypeTree)
|
||||
opt |= BuildAssetBundleOptions.DisableWriteTypeTree; //Do not include type information within the asset bundle (don't write type tree).
|
||||
if (IgnoreTypeTreeChanges)
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace YooAsset.Editor
|
||||
public ECompressOption CompressOption = ECompressOption.Uncompressed;
|
||||
|
||||
/// <summary>
|
||||
/// 从AssetBundle文件头里剥离Unity版本信息
|
||||
/// 从文件头里剥离Unity版本信息
|
||||
/// </summary>
|
||||
public bool StripUnityVersion = false;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace YooAsset.Editor
|
||||
public bool DisableWriteTypeTree = false;
|
||||
|
||||
/// <summary>
|
||||
/// 忽略类型树变化
|
||||
/// 忽略类型树变化(无效参数)
|
||||
/// </summary>
|
||||
public bool IgnoreTypeTreeChanges = true;
|
||||
|
||||
@@ -76,10 +76,9 @@ namespace YooAsset.Editor
|
||||
throw new System.NotImplementedException(CompressOption.ToString());
|
||||
|
||||
if (StripUnityVersion)
|
||||
buildParams.ContentBuildFlags |= UnityEditor.Build.Content.ContentBuildFlags.StripUnityVersion;
|
||||
|
||||
buildParams.ContentBuildFlags |= UnityEditor.Build.Content.ContentBuildFlags.StripUnityVersion; // Build Flag to indicate the Unity Version should not be written to the serialized file.
|
||||
if (DisableWriteTypeTree)
|
||||
buildParams.ContentBuildFlags |= UnityEditor.Build.Content.ContentBuildFlags.DisableWriteTypeTree;
|
||||
buildParams.ContentBuildFlags |= UnityEditor.Build.Content.ContentBuildFlags.DisableWriteTypeTree; //Do not include type information within the built content.
|
||||
|
||||
buildParams.UseCache = true;
|
||||
buildParams.CacheServerHost = CacheServerHost;
|
||||
|
||||
Reference in New Issue
Block a user