From 9c0f9557e8792b633be068d9fcd0386df36e640e Mon Sep 17 00:00:00 2001
From: hevinci <hevinci@hotmail.com>
Date: Thu, 21 Sep 2023 17:23:02 +0800
Subject: [PATCH] update yooasset2.0

---
 .../BaseTasks/TaskUpdateBundleInfo.cs         | 10 ++++++
 .../BuildTasks/TaskUpdateBundleInfo_BBP.cs    |  2 +-
 .../BuildTasks/TaskUpdateBundleInfo_RFBP.cs   |  2 +-
 .../BuildTasks/TaskUpdateBundleInfo_SBP.cs    |  2 +-
 .../Runtime/ResourcePackage/BundleInfo.cs     | 19 ++++++++---
 .../ResourcePackage/Interface/IPlayMode.cs    |  3 ++
 .../Runtime/ResourcePackage/ManifestTools.cs  |  6 ++--
 .../Operation/DownloaderOperation.cs          | 18 +++++++++-
 .../Internal/DeserializeManifestOperation.cs  |  8 +++--
 .../ResourcePackage/PackageManifest.cs        | 20 +++++++++--
 .../PlayMode/EditorSimulateModeImpl.cs        |  5 +++
 .../PlayMode/HostPlayModeImpl.cs              | 33 +++++++++++++++++--
 .../PlayMode/OfflinePlayModeImpl.cs           | 33 +++++++++++++++++--
 .../PlayMode/WebPlayModeImpl.cs               |  5 +++
 .../ResourcePackage/ResourcePackage.cs        | 16 ++++++++-
 15 files changed, 161 insertions(+), 21 deletions(-)

diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
index a5ec895..79e07f9 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskUpdateBundleInfo.cs
@@ -1,5 +1,6 @@
 using System;
 using System.IO;
+using System.Text;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEditor;
@@ -61,5 +62,14 @@ namespace YooAsset.Editor
 		protected abstract string GetBundleFileHash(string filePath, BuildParametersContext buildParametersContext);
 		protected abstract string GetBundleFileCRC(string filePath, BuildParametersContext buildParametersContext);
 		protected abstract long GetBundleFileSize(string filePath, BuildParametersContext buildParametersContext);
+
+		protected string GetFilePathTempHash(string filePath)
+		{
+			byte[] bytes = Encoding.UTF8.GetBytes(filePath);
+			return HashUtility.BytesMD5(bytes);
+
+			// 注意:在文件路径的哈希值冲突的情况下,可以使用下面的方法
+			//return $"{HashUtility.BytesMD5(bytes)}-{Guid.NewGuid():N}";
+		}
 	}
 }
\ No newline at end of file
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
index 28464d7..1deb582 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BuiltinBuildPipeline/BuildTasks/TaskUpdateBundleInfo_BBP.cs
@@ -55,7 +55,7 @@ namespace YooAsset.Editor
 		{
 			var buildMode = buildParametersContext.Parameters.BuildMode;
 			if (buildMode == EBuildMode.DryRunBuild || buildMode == EBuildMode.SimulateBuild)
-				return "00000000000000000000000000000000"; //32位
+				return GetFilePathTempHash(filePath);
 			else
 				return HashUtility.FileMD5(filePath);
 		}
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
index 359000b..d9337b0 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/RawFileBuildPipeline/BuildTasks/TaskUpdateBundleInfo_RFBP.cs
@@ -37,7 +37,7 @@ namespace YooAsset.Editor
 		{
 			var buildMode = buildParametersContext.Parameters.BuildMode;
 			if (buildMode == EBuildMode.SimulateBuild)
-				return "00000000000000000000000000000000"; //32位
+				return GetFilePathTempHash(filePath);
 			else
 				return HashUtility.FileMD5(filePath);
 		}
diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
index 1faa2f8..b09ce8f 100644
--- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
+++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/BuildTasks/TaskUpdateBundleInfo_SBP.cs
@@ -55,7 +55,7 @@ namespace YooAsset.Editor
 		{
 			var buildMode = buildParametersContext.Parameters.BuildMode;
 			if (buildMode == EBuildMode.SimulateBuild)
-				return "00000000000000000000000000000000"; //32位
+				return GetFilePathTempHash(filePath);
 			else
 				return HashUtility.FileMD5(filePath);
 		}
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/BundleInfo.cs b/Assets/YooAsset/Runtime/ResourcePackage/BundleInfo.cs
index 74e1925..74d8826 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/BundleInfo.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/BundleInfo.cs
@@ -176,23 +176,34 @@ namespace YooAsset
 		}
 
 		/// <summary>
-		/// 批量转换为解压BundleInfo
+		/// 批量创建解压BundleInfo
 		/// </summary>
-		public static List<BundleInfo> ConvertToUnpackInfos(ResourceAssist assist, List<PackageBundle> unpackList)
+		public static List<BundleInfo> CreateUnpackInfos(ResourceAssist assist, List<PackageBundle> unpackList)
 		{
 			List<BundleInfo> result = new List<BundleInfo>(unpackList.Count);
 			foreach (var packageBundle in unpackList)
 			{
-				var bundleInfo = ConvertToUnpackInfo(assist, packageBundle);
+				var bundleInfo = CreateUnpackInfo(assist, packageBundle);
 				result.Add(bundleInfo);
 			}
 			return result;
 		}
-		private static BundleInfo ConvertToUnpackInfo(ResourceAssist assist, PackageBundle packageBundle)
+		private static BundleInfo CreateUnpackInfo(ResourceAssist assist, PackageBundle packageBundle)
 		{
 			string streamingPath = PersistentHelper.ConvertToWWWPath(assist.Persistent.GetBuildinFilePath(packageBundle));
 			BundleInfo newBundleInfo = new BundleInfo(assist, packageBundle, ELoadMode.LoadFromStreaming, streamingPath, streamingPath);
 			return newBundleInfo;
 		}
+
+		/// <summary>
+		/// 创建导入BundleInfo
+		/// </summary>
+		public static BundleInfo CreateImportInfo(ResourceAssist assist, PackageBundle packageBundle, string filePath)
+		{
+			// 注意:我们把本地文件路径指定为远端下载地址
+			string persistentPath = PersistentHelper.ConvertToWWWPath(filePath);
+			BundleInfo bundleInfo = new BundleInfo(assist, packageBundle, BundleInfo.ELoadMode.None, persistentPath, persistentPath);
+			return bundleInfo;
+		}
 	}
 }
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs b/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs
index e1a87ff..2d0471a 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/Interface/IPlayMode.cs
@@ -36,5 +36,8 @@ namespace YooAsset
 		// 解压相关
 		ResourceUnpackerOperation CreateResourceUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout);
 		ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout);
+
+		// 导入相关
+		ResourceImporterOperation CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout);
 	}
 }
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ManifestTools.cs b/Assets/YooAsset/Runtime/ResourcePackage/ManifestTools.cs
index 7d150af..182bce3 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/ManifestTools.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/ManifestTools.cs
@@ -151,11 +151,13 @@ namespace YooAsset
 			}
 
 			// 填充BundleDic
-			manifest.BundleDic = new Dictionary<string, PackageBundle>(manifest.BundleList.Count);
+			manifest.BundleDic1 = new Dictionary<string, PackageBundle>(manifest.BundleList.Count);
+			manifest.BundleDic2 = new Dictionary<string, PackageBundle>(manifest.BundleList.Count);
 			foreach (var packageBundle in manifest.BundleList)
 			{
 				packageBundle.ParseBundle(manifest);
-				manifest.BundleDic.Add(packageBundle.BundleName, packageBundle);
+				manifest.BundleDic1.Add(packageBundle.BundleName, packageBundle);
+				manifest.BundleDic2.Add(packageBundle.FileName, packageBundle);
 			}
 
 			// 填充AssetDic
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs
index 2369440..bc3abb2 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs
@@ -267,7 +267,6 @@ namespace YooAsset
 			return operation;
 		}
 	}
-
 	public sealed class ResourceUnpackerOperation : DownloaderOperation
 	{
 		internal ResourceUnpackerOperation(string packageName, List<BundleInfo> downloadList, int downloadingMaxNumber, int failedTryAgain, int timeout)
@@ -285,4 +284,21 @@ namespace YooAsset
 			return operation;
 		}
 	}
+	public sealed class ResourceImporterOperation : DownloaderOperation
+	{
+		internal ResourceImporterOperation(string packageName, List<BundleInfo> downloadList, int downloadingMaxNumber, int failedTryAgain, int timeout)
+			: base(packageName, downloadList, downloadingMaxNumber, failedTryAgain, timeout)
+		{
+		}
+
+		/// <summary>
+		/// 创建空的导入器
+		/// </summary>
+		internal static ResourceImporterOperation CreateEmptyImporter(string packageName, int upackingMaxNumber, int failedTryAgain, int timeout)
+		{
+			List<BundleInfo> downloadList = new List<BundleInfo>();
+			var operation = new ResourceImporterOperation(packageName, downloadList, upackingMaxNumber, failedTryAgain, int.MaxValue);
+			return operation;
+		}
+	}
 }
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs
index a3c2989..740996b 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs
@@ -185,7 +185,8 @@ namespace YooAsset
 				{
 					_packageBundleCount = _buffer.ReadInt32();
 					Manifest.BundleList = new List<PackageBundle>(_packageBundleCount);
-					Manifest.BundleDic = new Dictionary<string, PackageBundle>(_packageBundleCount);
+					Manifest.BundleDic1 = new Dictionary<string, PackageBundle>(_packageBundleCount);
+					Manifest.BundleDic2 = new Dictionary<string, PackageBundle>(_packageBundleCount);
 					_progressTotalValue = _packageBundleCount;
 					_steps = ESteps.DeserializeBundleList;
 				}
@@ -203,8 +204,9 @@ namespace YooAsset
 						packageBundle.Tags = _buffer.ReadUTF8Array();
 						packageBundle.DependIDs = _buffer.ReadInt32Array();
 						packageBundle.ParseBundle(Manifest);
-						Manifest.BundleList.Add(packageBundle);				
-						Manifest.BundleDic.Add(packageBundle.BundleName, packageBundle);
+						Manifest.BundleList.Add(packageBundle);
+						Manifest.BundleDic1.Add(packageBundle.BundleName, packageBundle);
+						Manifest.BundleDic2.Add(packageBundle.FileName, packageBundle);
 
 						// 注意:原始文件可能存在相同的CacheGUID
 						if (Manifest.CacheGUIDs.Contains(packageBundle.CacheGUID) == false)
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PackageManifest.cs b/Assets/YooAsset/Runtime/ResourcePackage/PackageManifest.cs
index e2f0e2a..97f89a1 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PackageManifest.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PackageManifest.cs
@@ -67,7 +67,13 @@ namespace YooAsset
 		/// 资源包集合(提供BundleName获取PackageBundle)
 		/// </summary>
 		[NonSerialized]
-		public Dictionary<string, PackageBundle> BundleDic;
+		public Dictionary<string, PackageBundle> BundleDic1;
+
+		/// <summary>
+		/// 资源包集合(提供FileName获取PackageBundle)
+		/// </summary>
+		[NonSerialized]
+		public Dictionary<string, PackageBundle> BundleDic2;
 
 		/// <summary>
 		/// 资源映射集合(提供AssetPath获取PackageAsset)
@@ -170,9 +176,17 @@ namespace YooAsset
 		/// <summary>
 		/// 尝试获取包裹的资源包
 		/// </summary>
-		public bool TryGetPackageBundle(string bundleName, out PackageBundle result)
+		public bool TryGetPackageBundleByBundleName(string bundleName, out PackageBundle result)
 		{
-			return BundleDic.TryGetValue(bundleName, out result);
+			return BundleDic1.TryGetValue(bundleName, out result);
+		}
+
+		/// <summary>
+		/// 尝试获取包裹的资源包
+		/// </summary>
+		public bool TryGetPackageBundleByFileName(string fileName, out PackageBundle result)
+		{
+			return BundleDic2.TryGetValue(fileName, out result);
 		}
 
 		/// <summary>
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs
index 6b00d00..6741377 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeImpl.cs
@@ -85,6 +85,11 @@ namespace YooAsset
 		{
 			return ResourceUnpackerOperation.CreateEmptyUnpacker(PackageName, upackingMaxNumber, failedTryAgain, timeout);
 		}
+
+		ResourceImporterOperation IPlayMode.CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout)
+		{
+			return ResourceImporterOperation.CreateEmptyImporter(PackageName, importerMaxNumber, failedTryAgain, timeout);
+		}
 		#endregion
 
 		#region IBundleQuery接口
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs
index 1d0b431..4c375be 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/HostPlayModeImpl.cs
@@ -265,7 +265,7 @@ namespace YooAsset
 				}
 			}
 
-			return BundleInfo.ConvertToUnpackInfos(_assist, downloadList);
+			return BundleInfo.CreateUnpackInfos(_assist, downloadList);
 		}
 
 		ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout)
@@ -293,7 +293,36 @@ namespace YooAsset
 				}
 			}
 
-			return BundleInfo.ConvertToUnpackInfos(_assist, downloadList);
+			return BundleInfo.CreateUnpackInfos(_assist, downloadList);
+		}
+
+		ResourceImporterOperation IPlayMode.CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout)
+		{
+			List<BundleInfo> importerList = GetImporterListByFilePaths(_activeManifest, filePaths);
+			var operation = new ResourceImporterOperation(PackageName, importerList, importerMaxNumber, failedTryAgain, timeout);
+			return operation;
+		}
+		private List<BundleInfo> GetImporterListByFilePaths(PackageManifest manifest, string[] filePaths)
+		{
+			List<BundleInfo> result = new List<BundleInfo>();
+			foreach (var filePath in filePaths)
+			{
+				string fileName = System.IO.Path.GetFileName(filePath);
+				if (manifest.TryGetPackageBundleByFileName(fileName, out PackageBundle packageBundle))
+				{
+					// 忽略缓存文件
+					if (IsCachedPackageBundle(packageBundle))
+						continue;
+
+					var bundleInfo = BundleInfo.CreateImportInfo(_assist, packageBundle, filePath);
+					result.Add(bundleInfo);
+				}
+				else
+				{
+					YooLogger.Warning($"Not found package bundle, importer file path : {filePath}");
+				}
+			}
+			return result;
 		}
 		#endregion
 
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs
index 731abb7..f182bb8 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/OfflinePlayModeImpl.cs
@@ -109,7 +109,7 @@ namespace YooAsset
 				downloadList.Add(packageBundle);
 			}
 
-			return BundleInfo.ConvertToUnpackInfos(_assist, downloadList);
+			return BundleInfo.CreateUnpackInfos(_assist, downloadList);
 		}
 
 		ResourceUnpackerOperation IPlayMode.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout)
@@ -134,7 +134,36 @@ namespace YooAsset
 				}
 			}
 
-			return BundleInfo.ConvertToUnpackInfos(_assist, downloadList);
+			return BundleInfo.CreateUnpackInfos(_assist, downloadList);
+		}
+
+		ResourceImporterOperation IPlayMode.CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout)
+		{
+			List<BundleInfo> importerList = GetImporterListByFilePaths(_activeManifest, filePaths);
+			var operation = new ResourceImporterOperation(PackageName, importerList, importerMaxNumber, failedTryAgain, timeout);
+			return operation;
+		}
+		private List<BundleInfo> GetImporterListByFilePaths(PackageManifest manifest, string[] filePaths)
+		{
+			List<BundleInfo> result = new List<BundleInfo>();
+			foreach (var filePath in filePaths)
+			{
+				string fileName = System.IO.Path.GetFileName(filePath);
+				if (manifest.TryGetPackageBundleByFileName(fileName, out PackageBundle packageBundle))
+				{
+					// 忽略缓存文件
+					if (IsCachedPackageBundle(packageBundle))
+						continue;
+
+					var bundleInfo = BundleInfo.CreateImportInfo(_assist, packageBundle, filePath);
+					result.Add(bundleInfo);
+				}
+				else
+				{
+					YooLogger.Warning($"Not found package bundle, importer file path : {filePath}");
+				}
+			}
+			return result;
 		}
 		#endregion
 
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs
index 7e66515..4c7087d 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/WebPlayModeImpl.cs
@@ -112,6 +112,11 @@ namespace YooAsset
 		{
 			return ResourceUnpackerOperation.CreateEmptyUnpacker(PackageName, upackingMaxNumber, failedTryAgain, timeout);
 		}
+
+		ResourceImporterOperation IPlayMode.CreateResourceImporterByFilePaths(string[] filePaths, int importerMaxNumber, int failedTryAgain, int timeout)
+		{
+			return ResourceImporterOperation.CreateEmptyImporter(PackageName, importerMaxNumber, failedTryAgain, timeout);
+		}
 		#endregion
 
 		#region IBundleQuery接口
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
index 5025561..8da7364 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
@@ -352,7 +352,6 @@ namespace YooAsset
 		public void UnloadUnusedAssets()
 		{
 			DebugCheckInitialize();
-			_resourceMgr.Update();
 			_resourceMgr.UnloadUnusedAssets();
 		}
 
@@ -1028,6 +1027,21 @@ namespace YooAsset
 		}
 		#endregion
 
+		#region 资源导入
+		/// <summary>
+		/// 创建资源导入器
+		/// 注意:资源文件名称必须和资源服务器部署的文件名称一致!
+		/// </summary>
+		/// <param name="filePaths">资源路径列表</param>
+		/// <param name="importerMaxNumber">同时导入的最大文件数</param>
+		/// <param name="failedTryAgain">导入失败的重试次数</param>
+		public ResourceImporterOperation CreateResourceImporter(string[] filePaths, int importerMaxNumber, int failedTryAgain)
+		{
+			DebugCheckInitialize();
+			return _playModeImpl.CreateResourceImporterByFilePaths(filePaths, importerMaxNumber, failedTryAgain, int.MaxValue);
+		}
+		#endregion
+
 		#region 内部方法
 		/// <summary>
 		/// 是否包含资源文件