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