update editor code

1. 移除了BuildParameters.AutoAnalyzeRedundancy字段
2. 移除了DefaultShareAssetPackRule
3. 新增了ZeroRedundancySharedPackRule
4. 新增了FullRedundancySharedPackRule
This commit is contained in:
hevinci
2023-06-27 14:18:54 +08:00
parent 84f9d1985e
commit f54c8d6da4
11 changed files with 62 additions and 66 deletions

View File

@@ -48,12 +48,16 @@ namespace YooAsset.Editor
fullName = $"{bundleName}.{_bundleExtension}";
return fullName.ToLower();
}
/// <summary>
/// 获取共享资源包全名称
/// </summary>
public string GetShareBundleName(string packageName, bool uniqueBundleName)
{
// 注意:冗余的共享资源包名返回空
if (string.IsNullOrEmpty(_bundleName) && string.IsNullOrEmpty(_bundleExtension))
return string.Empty;
string fullName;
string bundleName = EditorTools.GetRegularPath(_bundleName).Replace('/', '_').Replace('.', '_').ToLower();
if (uniqueBundleName)

View File

@@ -5,9 +5,9 @@ using UnityEditor;
namespace YooAsset.Editor
{
/// <summary>
/// 零冗余共享资源打包规则
/// 零冗余共享资源打包规则
/// </summary>
public class DefaultSharedPackRule : ISharedPackRule
public class ZeroRedundancySharedPackRule : ISharedPackRule
{
public PackRuleResult GetPackRuleResult(string assetPath)
{
@@ -16,4 +16,16 @@ namespace YooAsset.Editor
return result;
}
}
/// <summary>
/// 全部冗余的共享资源打包规则
/// </summary>
public class FullRedundancySharedPackRule : ISharedPackRule
{
public PackRuleResult GetPackRuleResult(string assetPath)
{
PackRuleResult result = new PackRuleResult(string.Empty, string.Empty);
return result;
}
}
}