diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0fcf6a..a841cff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,104 @@
All notable changes to this package will be documented in this file.
+## [2.3.15] - 2025-09-09
+
+**重要**:升级了资源清单版本,不兼容老版本。建议重新提审安装包。
+
+### Improvements
+
+- 重构了UniTask扩展库的目录结构和说明文档。
+- 重构了内置文件系统类的加载和拷贝逻辑,解决在一些特殊机型上遇到的偶发性拷贝失败问题。
+- 增加了生成内置清单文件的窗口工具,详情见扩展工程里CreateBuildinCatalog目录。
+- 优化了异步操作系统的繁忙检测机制。
+- (#621) 资源配置页面可以展示DependCollector和StaticCollector包含的文件列表内容。
+- (#627) 优化了资源清单部分字段类型,CRC字段从字符串类型调整为整形,可以降低清单尺寸。
+
+### Fixed
+
+- 修复了构建页面扩展类缺少指定属性报错的问题。
+- (#611) 修复了资源扫描器配置页面,修改备注信息后会丢失焦点的问题。
+- (#622) 修复了纯鸿蒙系统读取内置加密文件失败的问题。
+- (#620) 修复了LINUX系统URL地址转换失败的问题。
+- (#631) 修复了NET 4.x程序集库Math.Clamp导致的编译错误。
+
+### Added
+
+- 新增了支持支付宝小游戏的文件系统扩展类。
+
+- 新增了支持Taptap小游戏的文件系统扩展类。
+
+- 新增了资源系统初始化参数:UseWeakReferenceHandle
+
+ 目前处于预览版,可以在引擎设置页面开启宏:YOOASSET_EXPERIMENTAL
+
+ ```csharp
+ ///
+ /// 启用弱引用资源句柄
+ ///
+ public bool UseWeakReferenceHandle = false;
+ ```
+
+- 内置文件系统和缓存文件系统新增初始化参数:FILE_VERIFY_MAX_CONCURRENCY
+
+ ```csharp
+ ///
+ /// 自定义参数:初始化的时候缓存文件校验最大并发数
+ ///
+ public int FileVerifyMaxConcurrency { private set; get; }
+ ```
+
+- (#623) 内置构建管线新增构建参数:StripUnityVersion
+
+ ```csharp
+ ///
+ /// 从文件头里剥离Unity版本信息
+ ///
+ public bool StripUnityVersion = false;
+ ```
+
+- 可编程构建管线新增构建参数:TrackSpriteAtlasDependencies
+
+ ```csharp
+ ///
+ /// 自动建立资源对象对图集的依赖关系
+ ///
+ public bool TrackSpriteAtlasDependencies = false;
+ ```
+
+- (#617) 新增资源收集配置参数:SupportExtensionless
+
+ 在不需要模糊加载模式的前提下,开启此选项,可以降低运行时内存大小。
+
+ ```csharp
+ public class CollectCommand
+ {
+ ///
+ /// 支持无后缀名的资源定位地址
+ ///
+ public bool SupportExtensionless { set; get; }
+ }
+ ```
+
+- (#625) 异步操作系统类新增监听方法。
+
+ ```csharp
+ class OperationSystem
+ {
+ ///
+ /// 监听任务开始
+ ///
+ public static void RegisterStartCallback(Action callback);
+
+ ///
+ /// 监听任务结束
+ ///
+ public static void RegisterFinishCallback(Action callback);
+ }
+ ```
+
+
+
## [2.3.14] - 2025-07-23
**重要**:**所有下载相关的超时参数(timeout)已更新判定逻辑**
diff --git a/Editor/AssetArtScanner/AssetArtScannerWindow.cs b/Editor/AssetArtScanner/AssetArtScannerWindow.cs
index 075d0e6..f2cea49 100644
--- a/Editor/AssetArtScanner/AssetArtScannerWindow.cs
+++ b/Editor/AssetArtScanner/AssetArtScannerWindow.cs
@@ -294,6 +294,11 @@ namespace YooAsset.Editor
_scannerListView.itemsSource = filterItems;
_scannerListView.Rebuild();
}
+
+ if (_lastModifyScannerIndex >= 0 && _lastModifyScannerIndex < _scannerListView.itemsSource.Count)
+ {
+ _scannerListView.selectedIndex = _lastModifyScannerIndex;
+ }
}
private List FilterScanners()
{
diff --git a/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
index 04cf64b..776ee25 100644
--- a/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
+++ b/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs
@@ -77,6 +77,12 @@ namespace YooAsset.Editor
foreach (var classType in viewerClassTypes)
{
var buildPipelineAttribute = EditorTools.GetAttribute(classType);
+ if (buildPipelineAttribute == null)
+ {
+ Debug.LogWarning($"The class {classType.FullName} need attribute {nameof(BuildPipelineAttribute)}");
+ continue;
+ }
+
string pipelineName = buildPipelineAttribute.PipelineName;
if (_viewClassDic.ContainsKey(pipelineName))
{
diff --git a/Editor/AssetBundleBuilder/BuildBundleInfo.cs b/Editor/AssetBundleBuilder/BuildBundleInfo.cs
index c9b087d..fee3181 100644
--- a/Editor/AssetBundleBuilder/BuildBundleInfo.cs
+++ b/Editor/AssetBundleBuilder/BuildBundleInfo.cs
@@ -27,7 +27,7 @@ namespace YooAsset.Editor
///
/// 文件哈希值
///
- public string PackageFileCRC { set; get; }
+ public uint PackageFileCRC { set; get; }
///
/// 文件哈希值
diff --git a/Editor/AssetBundleBuilder/BuildMapContext.cs b/Editor/AssetBundleBuilder/BuildMapContext.cs
index e027e8d..b2b1455 100644
--- a/Editor/AssetBundleBuilder/BuildMapContext.cs
+++ b/Editor/AssetBundleBuilder/BuildMapContext.cs
@@ -13,6 +13,11 @@ namespace YooAsset.Editor
///
private readonly Dictionary _bundleInfoDic = new Dictionary(10000);
+ ///
+ /// 图集资源集合
+ ///
+ public readonly List SpriteAtlasAssetList = new List(10000);
+
///
/// 未被依赖的资源列表
///
@@ -60,6 +65,12 @@ namespace YooAsset.Editor
newBundleInfo.PackAsset(assetInfo);
_bundleInfoDic.Add(bundleName, newBundleInfo);
}
+
+ // 统计所有的精灵图集
+ if (assetInfo.AssetInfo.IsSpriteAtlas())
+ {
+ SpriteAtlasAssetList.Add(assetInfo);
+ }
}
///
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateManifest.cs b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateManifest.cs
index d0e6efd..5ea564a 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateManifest.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateManifest.cs
@@ -2,6 +2,7 @@
using System.Linq;
using System.Collections;
using System.Collections.Generic;
+using UnityEditor;
namespace YooAsset.Editor
{
@@ -32,6 +33,7 @@ namespace YooAsset.Editor
PackageManifest manifest = new PackageManifest();
manifest.FileVersion = ManifestDefine.FileVersion;
manifest.EnableAddressable = buildMapContext.Command.EnableAddressable;
+ manifest.SupportExtensionless = buildMapContext.Command.SupportExtensionless;
manifest.LocationToLower = buildMapContext.Command.LocationToLower;
manifest.IncludeAssetGUID = buildMapContext.Command.IncludeAssetGUID;
manifest.OutputNameStyle = (int)buildParameters.FileNameStyle;
@@ -300,18 +302,40 @@ namespace YooAsset.Editor
#region YOOASSET_LEGACY_DEPENDENCY
private void ProcessBuiltinBundleDependency(BuildContext context, PackageManifest manifest)
{
+ // 注意:初始化资源清单建立引用关系
+ ManifestTools.InitManifest(manifest);
+
// 注意:如果是可编程构建管线,需要补充内置资源包
// 注意:该步骤依赖前面的操作!
var buildResultContext = context.TryGetContextObject();
+
if (buildResultContext != null)
{
- // 注意:初始化资源清单建立引用关系
- ManifestTools.InitManifest(manifest);
- ProcessBuiltinBundleReference(context, manifest, buildResultContext.BuiltinShadersBundleName);
- ProcessBuiltinBundleReference(context, manifest, buildResultContext.MonoScriptsBundleName);
+ ProcessBuiltinBundleReference(manifest, buildResultContext.BuiltinShadersBundleName);
+ ProcessBuiltinBundleReference(manifest, buildResultContext.MonoScriptsBundleName);
+
+ var buildParametersContext = context.TryGetContextObject();
+ var buildParameters = buildParametersContext.Parameters;
+ if (buildParameters is ScriptableBuildParameters scriptableBuildParameters)
+ {
+ if (scriptableBuildParameters.TrackSpriteAtlasDependencies)
+ {
+ // 注意:检测是否开启图集模式
+ // 说明:需要记录主资源对象对图集的依赖关系!
+ if (EditorSettings.spritePackerMode != SpritePackerMode.Disabled)
+ {
+ var buildMapContext = context.GetContextObject();
+ foreach (var spriteAtlasAsset in buildMapContext.SpriteAtlasAssetList)
+ {
+ string spriteAtlasBundleName = spriteAtlasAsset.BundleName;
+ ProcessBuiltinBundleReference(manifest, spriteAtlasBundleName);
+ }
+ }
+ }
+ }
}
}
- private void ProcessBuiltinBundleReference(BuildContext context, PackageManifest manifest, string builtinBundleName)
+ private void ProcessBuiltinBundleReference(PackageManifest manifest, string builtinBundleName)
{
if (string.IsNullOrEmpty(builtinBundleName))
return;
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateReport.cs b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateReport.cs
index 7c1e5ce..ac90684 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateReport.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateReport.cs
@@ -32,6 +32,7 @@ namespace YooAsset.Editor
// 收集器配置
buildReport.Summary.UniqueBundleName = buildMapContext.Command.UniqueBundleName;
buildReport.Summary.EnableAddressable = buildMapContext.Command.EnableAddressable;
+ buildReport.Summary.SupportExtensionless = buildMapContext.Command.SupportExtensionless;
buildReport.Summary.LocationToLower = buildMapContext.Command.LocationToLower;
buildReport.Summary.IncludeAssetGUID = buildMapContext.Command.IncludeAssetGUID;
buildReport.Summary.AutoCollectShaders = buildMapContext.Command.AutoCollectShaders;
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
index 2889381..ffcd297 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
@@ -63,7 +63,7 @@ namespace YooAsset.Editor
protected abstract string GetUnityHash(BuildBundleInfo bundleInfo, BuildContext context);
protected abstract uint GetUnityCRC(BuildBundleInfo bundleInfo, BuildContext context);
protected abstract string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
- protected abstract string GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
+ protected abstract uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
protected abstract long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
}
}
\ No newline at end of file
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs b/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
index 96f26f6..f6bbfff 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
@@ -45,10 +45,10 @@ namespace YooAsset.Editor
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
- protected override string GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
+ protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
string filePath = bundleInfo.PackageSourceFilePath;
- return HashUtility.FileCRC32(filePath);
+ return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuiltinBuildParameters.cs b/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuiltinBuildParameters.cs
index a5b33b6..4a4ce6c 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuiltinBuildParameters.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuiltinBuildParameters.cs
@@ -12,6 +12,11 @@ namespace YooAsset.Editor
///
public ECompressOption CompressOption = ECompressOption.Uncompressed;
+ ///
+ /// 从文件头里剥离Unity版本信息
+ ///
+ public bool StripUnityVersion = false;
+
///
/// 禁止写入类型树结构(可以降低包体和内存并提高加载效率)
///
@@ -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)
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/EditorSimulateBuildPipeline/BuildTasks/TaskUpdateBundleInfo_ESBP.cs b/Editor/AssetBundleBuilder/BuildPipeline/EditorSimulateBuildPipeline/BuildTasks/TaskUpdateBundleInfo_ESBP.cs
index 5d2745f..7bb7bbf 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/EditorSimulateBuildPipeline/BuildTasks/TaskUpdateBundleInfo_ESBP.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/EditorSimulateBuildPipeline/BuildTasks/TaskUpdateBundleInfo_ESBP.cs
@@ -24,9 +24,9 @@ namespace YooAsset.Editor
string filePath = bundleInfo.PackageSourceFilePath;
return GetFilePathTempHash(filePath);
}
- protected override string GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
+ protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
- return "00000000"; //8位
+ return 0;
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs b/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
index d68c14c..367662a 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
@@ -27,10 +27,10 @@ namespace YooAsset.Editor
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
- protected override string GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
+ protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
string filePath = bundleInfo.PackageSourceFilePath;
- return HashUtility.FileCRC32(filePath);
+ return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs b/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
index f94a716..15af935 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
@@ -45,10 +45,10 @@ namespace YooAsset.Editor
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
- protected override string GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
+ protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
string filePath = bundleInfo.PackageSourceFilePath;
- return HashUtility.FileCRC32(filePath);
+ return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
{
diff --git a/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildParameters.cs b/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildParameters.cs
index 2767ce1..e827c64 100644
--- a/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildParameters.cs
+++ b/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildParameters.cs
@@ -15,7 +15,7 @@ namespace YooAsset.Editor
public ECompressOption CompressOption = ECompressOption.Uncompressed;
///
- /// 从AssetBundle文件头里剥离Unity版本信息
+ /// 从文件头里剥离Unity版本信息
///
public bool StripUnityVersion = false;
@@ -25,10 +25,15 @@ namespace YooAsset.Editor
public bool DisableWriteTypeTree = false;
///
- /// 忽略类型树变化
+ /// 忽略类型树变化(无效参数)
///
public bool IgnoreTypeTreeChanges = true;
+ ///
+ /// 自动建立资源对象对图集的依赖关系
+ ///
+ public bool TrackSpriteAtlasDependencies = false;
+
///
/// 生成代码防裁剪配置
@@ -76,10 +81,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;
diff --git a/Editor/AssetBundleBuilder/VisualViewers/ScriptableBuildPipeline/ScriptableBuildPipelineViewer.cs b/Editor/AssetBundleBuilder/VisualViewers/ScriptableBuildPipeline/ScriptableBuildPipelineViewer.cs
index 0cdcca3..febe4a7 100644
--- a/Editor/AssetBundleBuilder/VisualViewers/ScriptableBuildPipeline/ScriptableBuildPipelineViewer.cs
+++ b/Editor/AssetBundleBuilder/VisualViewers/ScriptableBuildPipeline/ScriptableBuildPipelineViewer.cs
@@ -104,7 +104,6 @@ namespace YooAsset.Editor
var compressOption = AssetBundleBuilderSetting.GetPackageCompressOption(PackageName, PipelineName);
var clearBuildCache = AssetBundleBuilderSetting.GetPackageClearBuildCache(PackageName, PipelineName);
var useAssetDependencyDB = AssetBundleBuilderSetting.GetPackageUseAssetDependencyDB(PackageName, PipelineName);
- var builtinShaderBundleName = GetBuiltinShaderBundleName();
ScriptableBuildParameters buildParameters = new ScriptableBuildParameters();
buildParameters.BuildOutputRoot = AssetBundleBuilderHelper.GetDefaultBuildOutputRoot();
@@ -122,10 +121,10 @@ namespace YooAsset.Editor
buildParameters.CompressOption = compressOption;
buildParameters.ClearBuildCacheFiles = clearBuildCache;
buildParameters.UseAssetDependencyDB = useAssetDependencyDB;
- buildParameters.BuiltinShadersBundleName = builtinShaderBundleName;
buildParameters.EncryptionServices = CreateEncryptionServicesInstance();
buildParameters.ManifestProcessServices = CreateManifestProcessServicesInstance();
buildParameters.ManifestRestoreServices = CreateManifestRestoreServicesInstance();
+ buildParameters.BuiltinShadersBundleName = GetBuiltinShaderBundleName();
ScriptableBuildPipeline pipeline = new ScriptableBuildPipeline();
var buildResult = pipeline.Run(buildParameters, true);
@@ -143,6 +142,16 @@ namespace YooAsset.Editor
var packRuleResult = DefaultPackRule.CreateShadersPackRuleResult();
return packRuleResult.GetBundleName(PackageName, uniqueBundleName);
}
+
+ ///
+ /// Mono脚本的资源包名称
+ ///
+ protected string GetMonoScriptsBundleName()
+ {
+ var uniqueBundleName = AssetBundleCollectorSettingData.Setting.UniqueBundleName;
+ var packRuleResult = DefaultPackRule.CreateMonosPackRuleResult();
+ return packRuleResult.GetBundleName(PackageName, uniqueBundleName);
+ }
}
}
#endif
\ No newline at end of file
diff --git a/Editor/AssetBundleCollector/AssetBundleCollector.cs b/Editor/AssetBundleCollector/AssetBundleCollector.cs
index 796694c..56e31cd 100644
--- a/Editor/AssetBundleCollector/AssetBundleCollector.cs
+++ b/Editor/AssetBundleCollector/AssetBundleCollector.cs
@@ -139,13 +139,6 @@ namespace YooAsset.Editor
///
public List GetAllCollectAssets(CollectCommand command, AssetBundleCollectorGroup group)
{
- // 注意:模拟构建模式下只收集主资源
- if (command.SimulateBuild)
- {
- if (CollectorType != ECollectorType.MainAssetCollector)
- return new List();
- }
-
Dictionary result = new Dictionary(1000);
// 收集打包资源路径
diff --git a/Editor/AssetBundleCollector/AssetBundleCollectorConfig.cs b/Editor/AssetBundleCollector/AssetBundleCollectorConfig.cs
index 2412410..b353af7 100644
--- a/Editor/AssetBundleCollector/AssetBundleCollectorConfig.cs
+++ b/Editor/AssetBundleCollector/AssetBundleCollectorConfig.cs
@@ -10,7 +10,7 @@ namespace YooAsset.Editor
{
public class AssetBundleCollectorConfig
{
- public const string ConfigVersion = "v2.1";
+ public const string ConfigVersion = "v2025.8.28";
public const string XmlVersion = "Version";
public const string XmlCommon = "Common";
@@ -23,6 +23,7 @@ namespace YooAsset.Editor
public const string XmlPackageName = "PackageName";
public const string XmlPackageDesc = "PackageDesc";
public const string XmlEnableAddressable = "AutoAddressable";
+ public const string XmlSupportExtensionless = "SupportExtensionless";
public const string XmlLocationToLower = "LocationToLower";
public const string XmlIncludeAssetGUID = "IncludeAssetGUID";
public const string XmlIgnoreRuleName = "IgnoreRuleName";
@@ -99,6 +100,7 @@ namespace YooAsset.Editor
package.PackageName = packageElement.GetAttribute(XmlPackageName);
package.PackageDesc = packageElement.GetAttribute(XmlPackageDesc);
package.EnableAddressable = packageElement.GetAttribute(XmlEnableAddressable) == "True" ? true : false;
+ package.SupportExtensionless = packageElement.GetAttribute(XmlSupportExtensionless) == "True" ? true : false;
package.LocationToLower = packageElement.GetAttribute(XmlLocationToLower) == "True" ? true : false;
package.IncludeAssetGUID = packageElement.GetAttribute(XmlIncludeAssetGUID) == "True" ? true : false;
package.IgnoreRuleName = packageElement.GetAttribute(XmlIgnoreRuleName);
@@ -211,6 +213,7 @@ namespace YooAsset.Editor
packageElement.SetAttribute(XmlPackageName, package.PackageName);
packageElement.SetAttribute(XmlPackageDesc, package.PackageDesc);
packageElement.SetAttribute(XmlEnableAddressable, package.EnableAddressable.ToString());
+ packageElement.SetAttribute(XmlSupportExtensionless, package.SupportExtensionless.ToString());
packageElement.SetAttribute(XmlLocationToLower, package.LocationToLower.ToString());
packageElement.SetAttribute(XmlIncludeAssetGUID, package.IncludeAssetGUID.ToString());
packageElement.SetAttribute(XmlIgnoreRuleName, package.IgnoreRuleName);
@@ -275,6 +278,23 @@ namespace YooAsset.Editor
return UpdateXmlConfig(xmlDoc);
}
+ // v2.1 -> v2025.8.28
+ if (configVersion == "v2.1")
+ {
+ // 读取包裹配置
+ var packageNodeList = root.GetElementsByTagName(XmlPackage);
+ foreach (var packageNode in packageNodeList)
+ {
+ XmlElement packageElement = packageNode as XmlElement;
+ if (packageElement.HasAttribute(XmlSupportExtensionless) == false)
+ packageElement.SetAttribute(XmlSupportExtensionless, "True");
+ }
+
+ // 更新版本
+ root.SetAttribute(XmlVersion, "v2025.8.28");
+ return UpdateXmlConfig(xmlDoc);
+ }
+
return false;
}
}
diff --git a/Editor/AssetBundleCollector/AssetBundleCollectorPackage.cs b/Editor/AssetBundleCollector/AssetBundleCollectorPackage.cs
index e213950..5454e1f 100644
--- a/Editor/AssetBundleCollector/AssetBundleCollectorPackage.cs
+++ b/Editor/AssetBundleCollector/AssetBundleCollectorPackage.cs
@@ -25,6 +25,11 @@ namespace YooAsset.Editor
///
public bool EnableAddressable = false;
+ ///
+ /// 支持无后缀名的资源定位地址
+ ///
+ public bool SupportExtensionless = true;
+
///
/// 资源定位地址大小写不敏感
///
diff --git a/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs b/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
index d9b0614..71f4b94 100644
--- a/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
+++ b/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
@@ -111,6 +111,7 @@ namespace YooAsset.Editor
command.UniqueBundleName = UniqueBundleName;
command.UseAssetDependencyDB = useAssetDependencyDB;
command.EnableAddressable = package.EnableAddressable;
+ command.SupportExtensionless = package.SupportExtensionless;
command.LocationToLower = package.LocationToLower;
command.IncludeAssetGUID = package.IncludeAssetGUID;
command.AutoCollectShaders = package.AutoCollectShaders;
diff --git a/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
index 5745423..29b8cd8 100644
--- a/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
+++ b/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs
@@ -38,6 +38,7 @@ namespace YooAsset.Editor
private VisualElement _setting2Container;
private Toggle _enableAddressableToogle;
+ private Toggle _supportExtensionlessToogle;
private Toggle _locationToLowerToogle;
private Toggle _includeAssetGUIDToogle;
private Toggle _autoCollectShadersToogle;
@@ -131,6 +132,17 @@ namespace YooAsset.Editor
RefreshWindow();
}
});
+ _supportExtensionlessToogle = root.Q("SupportExtensionless");
+ _supportExtensionlessToogle.RegisterValueChangedCallback(evt =>
+ {
+ var selectPackage = _packageListView.selectedItem as AssetBundleCollectorPackage;
+ if (selectPackage != null)
+ {
+ selectPackage.SupportExtensionless = evt.newValue;
+ AssetBundleCollectorSettingData.ModifyPackage(selectPackage);
+ RefreshWindow();
+ }
+ });
_locationToLowerToogle = root.Q("LocationToLower");
_locationToLowerToogle.RegisterValueChangedCallback(evt =>
{
@@ -487,6 +499,7 @@ namespace YooAsset.Editor
_packageSettingsButton.SetEnabled(true);
_packageSettingsButton.text = $"{packageSettingName} ({selectPackage.PackageName})";
_enableAddressableToogle.SetValueWithoutNotify(selectPackage.EnableAddressable);
+ _supportExtensionlessToogle.SetValueWithoutNotify(selectPackage.SupportExtensionless);
_locationToLowerToogle.SetValueWithoutNotify(selectPackage.LocationToLower);
_includeAssetGUIDToogle.SetValueWithoutNotify(selectPackage.IncludeAssetGUID);
_autoCollectShadersToogle.SetValueWithoutNotify(selectPackage.AutoCollectShaders);
@@ -831,7 +844,7 @@ namespace YooAsset.Editor
var foldout = new Foldout();
foldout.name = "Foldout1";
foldout.value = false;
- foldout.text = "Main Assets";
+ foldout.text = "Assets";
elementFoldout.Add(foldout);
}
@@ -864,11 +877,9 @@ namespace YooAsset.Editor
var foldout = element.Q("Foldout1");
foldout.RegisterValueChangedCallback(evt =>
{
- if (evt.newValue)
- RefreshFoldout(foldout, selectGroup, collector);
- else
- foldout.Clear();
+ RefreshFoldoutContent(foldout, selectGroup, collector);
});
+ RefreshFoldoutName(foldout, collector.CollectorType);
// Remove Button
var removeBtn = element.Q