【m】yooasset更新
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3s
Plugin Library CI / publish (07.RKTools) (push) Successful in 2s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 1m25s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 4s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 4s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s

This commit is contained in:
2026-04-13 22:36:57 +08:00
parent cb6a956ac2
commit a7902e8224
572 changed files with 1597 additions and 904 deletions

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8011a020a6ffcbe449ab1c4dba720e44
guid: de7563040250b4e4a835d1fc90238e38
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 20ebab6a20b80e544a7cd4875db5d056
guid: f48abdec05f0dbe438a83e181fe6bc93
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3389a58655cf19d4b869700157fb3a1a
guid: 09788b4733bab2d4792fdd5d28e7653c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5cd42055a3f6dab45aa6d5c80b0d2b98
guid: 66e43420e95cd0b4bae8803a31e9817b
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c5c28df15520ac14fb5225f6b8833508
guid: 28ba29adb4949284e8c48893218b0d9a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 02fac22a77ace4d41a4f4bc172726534
guid: f94918fa1ea63c34fa0e49fdad4119cf
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 59d93bdabc0d82344a68ea2236ee49cf
guid: 447008dd110b8d746aafbe88c78bee5d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -106,7 +106,27 @@ namespace YooAsset.Editor
/// </summary>
public string[] GetAllPackAssetPaths()
{
return AllPackAssets.Select(t => t.AssetInfo.AssetPath).ToArray();
List<string> results = new List<string>(AllPackAssets.Count);
for (int i = 0; i < AllPackAssets.Count; i++)
{
var packAsset = AllPackAssets[i];
results.Add(packAsset.AssetInfo.AssetPath);
}
return results.ToArray();
}
/// <summary>
/// 获取构建的资源可寻址列表
/// </summary>
public string[] GetAllPackAssetAddress()
{
List<string> results = new List<string>(AllPackAssets.Count);
for (int i = 0; i < AllPackAssets.Count; i++)
{
var packAsset = AllPackAssets[i];
results.Add(packAsset.Address);
}
return results.ToArray();
}
/// <summary>
@@ -153,13 +173,15 @@ namespace YooAsset.Editor
/// <summary>
/// 创建AssetBundleBuild类
/// </summary>
public UnityEditor.AssetBundleBuild CreatePipelineBuild()
public UnityEditor.AssetBundleBuild CreatePipelineBuild(bool replaceAssetPathWithAddress)
{
// 注意我们不再支持AssetBundle的变种机制
AssetBundleBuild build = new AssetBundleBuild();
build.assetBundleName = BundleName;
build.assetBundleVariant = string.Empty;
build.assetNames = GetAllPackAssetPaths();
if (replaceAssetPathWithAddress)
build.addressableNames = GetAllPackAssetAddress();
return build;
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 00cb145f3a41f214cb6f9d878e279e23
guid: 826a9d7b4de0eba40b5c39b33747c011
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -96,12 +96,12 @@ namespace YooAsset.Editor
/// <summary>
/// 获取构建管线里需要的数据
/// </summary>
public UnityEditor.AssetBundleBuild[] GetPipelineBuilds()
public UnityEditor.AssetBundleBuild[] GetPipelineBuilds(bool replaceAssetPathWithAddres)
{
List<UnityEditor.AssetBundleBuild> builds = new List<UnityEditor.AssetBundleBuild>(_bundleInfoDic.Count);
foreach (var bundleInfo in _bundleInfoDic.Values)
{
builds.Add(bundleInfo.CreatePipelineBuild());
builds.Add(bundleInfo.CreatePipelineBuild(replaceAssetPathWithAddres));
}
return builds.ToArray();
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ef08a026f66278948886a805726d9498
guid: 8229aa3f8a369204db5c368715191e2f
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 23c50ced9cda12e47bfa9411ec8c7d30
guid: 98bb314dc26ba184fbb9e9fdcdb58a1d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 086b9c79a3e7c2b4bb791cc3cc8b5c94
guid: b84510feab7cbe44a9b6d8ef0b3f559c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 36cf1ec01deaa594b863c9798ecaced9
guid: 431722e1bca52d448825f603789d7e4b
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d2e4085c1b335d547b629bace7654db0
guid: 254f430e0264bd84387878f8d7280e44
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: aecf05051992ad14e833529101559071
guid: 5c77e17c3a3a57548a218f1cd26f5a55
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cef6068e037c6904eaed386f5bc3f71a
guid: 2d2c835e5e40ca34d93480587c8125df
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -19,7 +19,7 @@ namespace YooAsset.Editor
/// <summary>
/// 创建补丁清单文件到输出目录
/// </summary>
protected void CreateManifestFile(bool processBundleDepends, bool processBundleTags, BuildContext context)
protected void CreateManifestFile(bool processBundleDepends, bool processBundleTags, bool replaceAssetPathWithAddress, BuildContext context)
{
var buildMapContext = context.GetContextObject<BuildMapContext>();
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
@@ -36,6 +36,7 @@ namespace YooAsset.Editor
manifest.SupportExtensionless = buildMapContext.Command.SupportExtensionless;
manifest.LocationToLower = buildMapContext.Command.LocationToLower;
manifest.IncludeAssetGUID = buildMapContext.Command.IncludeAssetGUID;
manifest.ReplaceAssetPathWithAddress = replaceAssetPathWithAddress;
manifest.OutputNameStyle = (int)buildParameters.FileNameStyle;
manifest.BuildBundleType = buildParameters.BuildBundleType;
manifest.BuildPipeline = buildParameters.BuildPipeline;
@@ -58,7 +59,13 @@ namespace YooAsset.Editor
// 4. 处理内置资源包
if (processBundleDepends)
{
// 注意:初始化资源清单建立引用关系
manifest.Initialize();
ProcessBuiltinBundleDependency(context, manifest);
}
// 创建资源清单文本文件
{
@@ -302,9 +309,6 @@ namespace YooAsset.Editor
#region YOOASSET_LEGACY_DEPENDENCY
private void ProcessBuiltinBundleDependency(BuildContext context, PackageManifest manifest)
{
// 注意:初始化资源清单建立引用关系
ManifestTools.InitManifest(manifest);
// 注意:如果是可编程构建管线,需要补充内置资源包
// 注意:该步骤依赖前面的操作!
var buildResultContext = context.TryGetContextObject<TaskBuilding_SBP.BuildResultContext>();

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4ee2c2f00a1d67d45adee1d5200870cb
guid: 566c37f5a59f2e84397a9527981a7310
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -54,6 +54,7 @@ namespace YooAsset.Editor
buildReport.Summary.CompressOption = builtinBuildParameters.CompressOption;
buildReport.Summary.DisableWriteTypeTree = builtinBuildParameters.DisableWriteTypeTree;
buildReport.Summary.IgnoreTypeTreeChanges = builtinBuildParameters.IgnoreTypeTreeChanges;
buildReport.Summary.ReplaceAssetPathWithAddress = builtinBuildParameters.ReplaceAssetPathWithAddress;
}
else if (buildParameters is ScriptableBuildParameters)
{
@@ -61,6 +62,7 @@ namespace YooAsset.Editor
buildReport.Summary.CompressOption = scriptableBuildParameters.CompressOption;
buildReport.Summary.DisableWriteTypeTree = scriptableBuildParameters.DisableWriteTypeTree;
buildReport.Summary.IgnoreTypeTreeChanges = scriptableBuildParameters.IgnoreTypeTreeChanges;
buildReport.Summary.ReplaceAssetPathWithAddress = scriptableBuildParameters.ReplaceAssetPathWithAddress;
buildReport.Summary.WriteLinkXML = scriptableBuildParameters.WriteLinkXML;
buildReport.Summary.CacheServerHost = scriptableBuildParameters.CacheServerHost;
buildReport.Summary.CacheServerPort = scriptableBuildParameters.CacheServerPort;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 869f8e34d5e3221428dc9016adf1d2b6
guid: bd12814185b4c7044b0afd59f9c1c948
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1f269175a60e227428b7029f09e2578e
guid: c78d471226b9c8d429a2d962370f480b
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b0ea8b7c5a6b8ee4dabc4ccfd1516fc5
guid: baee18c5c7b76584b90413bf20fdae9a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -44,9 +44,9 @@ namespace YooAsset.Editor
{
bundleInfo.PackageUnityHash = GetUnityHash(bundleInfo, context);
bundleInfo.PackageUnityCRC = GetUnityCRC(bundleInfo, context);
bundleInfo.PackageFileHash = GetBundleFileHash(bundleInfo, buildParametersContext);
bundleInfo.PackageFileCRC = GetBundleFileCRC(bundleInfo, buildParametersContext);
bundleInfo.PackageFileSize = GetBundleFileSize(bundleInfo, buildParametersContext);
bundleInfo.PackageFileHash = GetBundleFileHash(bundleInfo, context);
bundleInfo.PackageFileCRC = GetBundleFileCRC(bundleInfo, context);
bundleInfo.PackageFileSize = GetBundleFileSize(bundleInfo, context);
}
// 4.更新补丁包输出的文件路径
@@ -62,8 +62,8 @@ 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 uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
protected abstract long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext);
protected abstract string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context);
protected abstract uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context);
protected abstract long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context);
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1dda2f1ef3b6c4e48a398217335b55f5
guid: 4882f54fbf0bcb04680fb581deae4889
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c4cdeb127aac764438d33eab6b58c7ac
guid: 5c0a1b7e213a63047994bbf419867c64
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 60848132f065b29419673f75bb30e0f2
guid: 950b38743cf6b74419af76ab327206ed
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -23,7 +23,8 @@ namespace YooAsset.Editor
// 开始构建
string pipelineOutputDirectory = buildParametersContext.GetPipelineOutputDirectory();
BuildAssetBundleOptions buildOptions = builtinBuildParameters.GetBundleBuildOptions();
AssetBundleManifest unityManifest = BuildPipeline.BuildAssetBundles(pipelineOutputDirectory, buildMapContext.GetPipelineBuilds(), buildOptions, buildParametersContext.Parameters.BuildTarget);
var bundleBuilds = buildMapContext.GetPipelineBuilds(builtinBuildParameters.ReplaceAssetPathWithAddress);
AssetBundleManifest unityManifest = BuildPipeline.BuildAssetBundles(pipelineOutputDirectory, bundleBuilds, buildOptions, buildParametersContext.Parameters.BuildTarget);
if (unityManifest == null)
{
string message = BuildLogger.GetErrorMessage(ErrorCode.UnityEngineBuildFailed, "UnityEngine build failed !");

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7209808a97fe9434db0a5f5e9d622d22
guid: d10c8f8b9937fe848b2cb0cc0836280d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 019af27798a44894a9ad9919510faac3
guid: 80c30fb9eb35a514daadefa4a2fb4f28
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6f6cb111993867b49b14deaf4c3967db
guid: 8fe3d00b03dc9c64a96b7acfdf99b54c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -11,7 +11,10 @@ namespace YooAsset.Editor
void IBuildTask.Run(BuildContext context)
{
CreateManifestFile(true, true, context);
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
var builtinBuildParameters = buildParametersContext.Parameters as BuiltinBuildParameters;
bool replaceAssetPathWithAddress = builtinBuildParameters.ReplaceAssetPathWithAddress;
CreateManifestFile(true, true, replaceAssetPathWithAddress, context);
}
protected override string[] GetBundleDepends(BuildContext context, string bundleName)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dd9628b0db825a24b82f178dd614b35c
guid: db8a306d84a7b284f9acc8925cfaf812
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 75d9ef890ba31514585c7e159c8fa330
guid: 509e58fe0b061a54795f60209fbbbb5a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 78b44d91c31a02645b261fcff1b08a86
guid: cb66f3d5c56a85643a0e009d59079e54
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d006dfae5ab13b248b30aac90a981815
guid: 6e871faedf2401c4c9225eb9815c5aa0
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8d9c11e27500c7948a3882ba17955414
guid: b621fbca3fe162448bda8c817daa101a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c7b08ad0d83856243b04677bf2b29265
guid: 6dc94501197179048b85b6e959c50e9c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -40,17 +40,17 @@ namespace YooAsset.Editor
throw new Exception(message);
}
}
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return FileUtility.GetFileSize(filePath);

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bd91b9a355deac843ba98f5661aa2909
guid: 26a84c5ae3c1a344883de3f85d48c952
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8dab8ea972027e9418f8b85701d59a94
guid: b883ac0c3c25e8143847a9326e2961cf
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -27,6 +27,12 @@ namespace YooAsset.Editor
/// </summary>
public bool IgnoreTypeTreeChanges = true;
/// <summary>
/// 使用可寻址地址代替资源路径
/// 说明:开启此项可以节省运行时清单占用的内存!
/// </summary>
public bool ReplaceAssetPathWithAddress = false;
/// <summary>
/// 获取内置构建管线的构建选项

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 308868ae6f76f5e4f9c233551db23412
guid: cd05d8038cf42e54e974483bb5da4198
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 441e7230a382a02488b263b39db947e8
guid: 62d7756143e561843800bc521b5e090f
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 653317a9ea995c74e8b5c0a44a69e0ed
guid: 12f78ad22f0513c44b6037469dbd6363
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bf2fe9784bc3bd24bb5506a8a54dc2a1
guid: 1138888cdba447345abb498b0c89affa
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -7,7 +7,7 @@ namespace YooAsset.Editor
{
void IBuildTask.Run(BuildContext context)
{
CreateManifestFile(false, false, context);
CreateManifestFile(false, true, false, context);
}
protected override string[] GetBundleDepends(BuildContext context, string bundleName)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 28b5843c9e4470041b146ecf8ccd7c22
guid: 120e126cc10604c4f811c3b6377f7452
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4cebcb2c0591e734a81d0a5eef3f543b
guid: 789c337b5b82f1c438a588982dfca346
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2aae9b64def05154ea697c752a1b1135
guid: abbe56a7120e34349b10f20956ed51a7
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -19,16 +19,16 @@ namespace YooAsset.Editor
{
return 0;
}
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return GetFilePathTempHash(filePath);
}
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context)
{
return 0;
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context)
{
return GetBundleTempSize(bundleInfo);
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 07d6e1b0fd8289a42abe6a808c6b682b
guid: 990b41f647b80a34ab666a3b0c1ba3f6
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 007df85263bf2da4da5f8ba61475f4bc
guid: 03ea37371e6dc644cb2e6eabf9e7e2ad
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2fda5eb3c53dd8840bb06f183c4520fa
guid: 9caf8e4846ad8b64eb04a4d5179942ff
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8dbcc09fef2fd9848ab39467d8aab450
guid: 8a5f30f9c58f36946b2028bddce08c9c
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 74364a2eba5e06a4db8498df3bcfa375
guid: 141f7d1ebdf7cc147801aa711e29ac17
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9e60479196ea5c34f8c0493f1046d01e
guid: 3625d4b8b5b79324ebf7ec19a87677e7
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 76c3df33b7f03cc4db0f5f0099ea4bd4
guid: bf10a5495e90b844b8aca1eadf7ed8f7
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2cb2339086ff9b547bb1681fb4af419a
guid: 563771ecaff17ee498b5fda7c1132e62
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -9,7 +9,7 @@ namespace YooAsset.Editor
{
void IBuildTask.Run(BuildContext context)
{
CreateManifestFile(false, true, context);
CreateManifestFile(false, true, false, context);
}
protected override string[] GetBundleDepends(BuildContext context, string bundleName)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fe11ea8364a5e6d46a22f28390e3b42b
guid: 86bdc7d5ae31fdd409f9dc68d73e2600
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9a93f174764d6924aaab951a07c99ebb
guid: a6d813044f843b944b4ec3d6f562c7e2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 30d94aceeca974247879db93aef646dd
guid: 55595ba60c30a634d8921cfc6524e201
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d1ca4ca045dd5324e95fdf9b20fa439d
guid: b3e156139dcc25f4c9440ec3d6cb96d2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9a8a40249b832874088b46491f6b4912
guid: a8bdb5b4ee29e5b48a88689c6519b830
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f7b48bc4c7276634db81a706546ebf5c
guid: 97204fd262bb58449a87e517318905c3
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -15,27 +15,55 @@ namespace YooAsset.Editor
protected override string GetUnityHash(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
var rawFileBuildParameters = buildParametersContext.Parameters as RawFileBuildParameters;
if (rawFileBuildParameters.IncludePathInHash)
{
string filePath = bundleInfo.PackageSourceFilePath;
return GetFileMD5IncludePath(filePath);
}
else
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
}
protected override uint GetUnityCRC(BuildBundleInfo bundleInfo, BuildContext context)
{
return 0;
}
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
var rawFileBuildParameters = buildParametersContext.Parameters as RawFileBuildParameters;
if (rawFileBuildParameters.IncludePathInHash)
{
string filePath = bundleInfo.PackageSourceFilePath;
return GetFileMD5IncludePath(filePath);
}
else
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
}
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return FileUtility.GetFileSize(filePath);
}
private string GetFileMD5IncludePath(string filePath)
{
string pathHash = HashUtility.StringMD5(filePath.ToLowerInvariant());
string contentHash = HashUtility.FileMD5(filePath);
string combined = pathHash + contentHash;
return HashUtility.StringMD5(combined);
}
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 21957134736ffb5438359bc3961a952b
guid: b2c8ae6a3e6ca3b4bba4e1495ea297d4
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -6,5 +6,9 @@ namespace YooAsset.Editor
{
public class RawFileBuildParameters : BuildParameters
{
/// <summary>
/// 文件哈希值计算包含路径信息
/// </summary>
public bool IncludePathInHash = false;
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a920c5c95f0137543bba35eb97c8311f
guid: d5ba9a5c89be56147a651be73b1d8a30
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 380212279cde5d24ca15eb31f288412f
guid: ee1731ae83e2f0045bab58773be95743
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 664dc81b625b1294bb90382e710d0d75
guid: c8b9d8597bfdc994e9ef52f319cc96ec
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: adfda7575359bc540b8ac5f43ef71da2
guid: 64c9242d4708b1f47b1469897bbfe127
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -24,7 +24,8 @@ namespace YooAsset.Editor
var scriptableBuildParameters = buildParametersContext.Parameters as ScriptableBuildParameters;
// 构建内容
var buildContent = new BundleBuildContent(buildMapContext.GetPipelineBuilds());
var bundleBuilds = buildMapContext.GetPipelineBuilds(scriptableBuildParameters.ReplaceAssetPathWithAddress);
var buildContent = new BundleBuildContent(bundleBuilds);
// 开始构建
IBundleBuildResults buildResults;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5450c08b2797fcd449bbe8460784f4c5
guid: 255306458772c8b4eb94ca288dfc77ac
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 357ff9307db49c943b82c8920686a615
guid: 67f8cc89ad41abe42aa1eed9a3d41f20
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d24861b2e8f3a774588f92fcd69a9cf6
guid: d8241b1eb8e22874b84d279dae9bbd1b
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -13,7 +13,10 @@ namespace YooAsset.Editor
void IBuildTask.Run(BuildContext context)
{
CreateManifestFile(true, true, context);
var buildParametersContext = context.GetContextObject<BuildParametersContext>();
var scriptableBuildParameters = buildParametersContext.Parameters as ScriptableBuildParameters;
bool replaceAssetPathWithAddress = scriptableBuildParameters.ReplaceAssetPathWithAddress;
CreateManifestFile(true, true, replaceAssetPathWithAddress, context);
}
protected override string[] GetBundleDepends(BuildContext context, string bundleName)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cbe6f2137f62ce648989fe9557301604
guid: adfbea99cce4707409469a37c7e5da31
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2a9ff5dd6d86c074d8d68ba6e5de3d16
guid: c798c7056a23c8840af89492d30cb89c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ca25529ae5ca6ab4b986aff22473960e
guid: 11893a8199d4d8549b76a16c740d507a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 559a9187d1d0b1e4f814edf2c53418b3
guid: ff8ba0dd63fc3304c8f20680733a74e0
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ee1529181f41b4d4fa0b409af4650e91
guid: cc3a7680622c5254f80b9541196091c3
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c824d686635f13543b17602649338f21
guid: 698615f2a9590ef488a62419111d1e3d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -40,17 +40,17 @@ namespace YooAsset.Editor
throw new Exception(message);
}
}
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileMD5(filePath);
}
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return HashUtility.FileCRC32Value(filePath);
}
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildParametersContext buildParametersContext)
protected override long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context)
{
string filePath = bundleInfo.PackageSourceFilePath;
return FileUtility.GetFileSize(filePath);

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 59d6293eac923614e865e58520cf2946
guid: c53b8e8dd0618e344931ad9ac4ad0656
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ba25800dd83ee324a9cca35b010447d7
guid: 16aa7c2c37209a043b4f33d7854047c6
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0fb90314fb9604c49916b918fb7ca058
guid: f38422f6a64300243af6b4fbf84644ba
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -29,6 +29,12 @@ namespace YooAsset.Editor
/// </summary>
public bool IgnoreTypeTreeChanges = true;
/// <summary>
/// 使用可寻址地址代替资源路径
/// 说明:开启此项可以节省运行时清单占用的内存!
/// </summary>
public bool ReplaceAssetPathWithAddress = false;
/// <summary>
/// 自动建立资源对象对图集的依赖关系
/// </summary>

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a7bd1d7e1221fed4389e4efe1bb2e206
guid: 83ca8a0609deaf04d9d1f1f0d396efa9
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1cc8e446593ff9049a246544a1b70791
guid: 2e2dcea2c826dc94d8b439f724b25d57
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cd2979f0a2e072142a4e3b96de95073d
guid: 2875232ad7f87c148b752d432f3a54f2
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: eb46a91f7edad9e4b8814829a33df014
guid: 6a232601f99c4634ea17fca4979f80ab
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 851e558739fd70147be0ea90e2e88518
guid: 2bc82466a51f50141975e4424095aa09
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4e26bdcacb014bb4490f18272127050d
guid: e0855c4b5eaa26942bd7ad177fe3c288
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9bedcc06ee301034cade6170f9771d93
guid: 79014124da678684388454d6ea892722
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2f038e615f0fb094fb40138c2e0b07b1
guid: c3a10fd19801c0c428bac53081a96517
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cadfee738c5899147942a441df7531ee
guid: 8888657c45e12c646a8349bac6bf0326
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d60185a4ac0b1b34e835e5b4a1d82783
guid: 151a4acd5ad1c2046be20e080f9bdad4
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c27e0c7b8e7b7de4f915641c75187fa9
guid: 46b8b200b841799498896403d9d427c2
MonoImporter:
externalObjects: {}
serializedVersion: 2

Some files were not shown because too many files have changed in this diff Show More