Update adressable location

pull/9/head
hevinci 2022-04-28 18:28:46 +08:00
parent a4b098084d
commit 9f1eaf4a62
5 changed files with 6 additions and 6 deletions

View File

@ -100,7 +100,7 @@ namespace YooAsset.Editor
var buildAssetInfo = pair.Value; var buildAssetInfo = pair.Value;
if (buildAssetInfo.BundleNameIsValid() == false) if (buildAssetInfo.BundleNameIsValid() == false)
{ {
string shaderBundleName = AssetBundleGrouperSettingHelper.CollectShaderBundleName(buildAssetInfo.AssetPath); string shaderBundleName = AssetBundleGrouperHelper.CollectShaderBundleName(buildAssetInfo.AssetPath);
if (string.IsNullOrEmpty(shaderBundleName) == false) if (string.IsNullOrEmpty(shaderBundleName) == false)
{ {
buildAssetInfo.SetBundleName(shaderBundleName); buildAssetInfo.SetBundleName(shaderBundleName);
@ -108,7 +108,7 @@ namespace YooAsset.Editor
else else
{ {
string bundleName = defaultPackRule.GetBundleName(new PackRuleData(buildAssetInfo.AssetPath)); string bundleName = defaultPackRule.GetBundleName(new PackRuleData(buildAssetInfo.AssetPath));
bundleName = AssetBundleGrouperSettingHelper.CorrectBundleName(bundleName, false); bundleName = AssetBundleGrouperHelper.CorrectBundleName(bundleName, false);
buildAssetInfo.SetBundleName(bundleName); buildAssetInfo.SetBundleName(bundleName);
} }
} }

View File

@ -197,7 +197,7 @@ namespace YooAsset.Editor
} }
private string GetBundleName(AssetBundleGrouper grouper, string assetPath, bool isRawAsset) private string GetBundleName(AssetBundleGrouper grouper, string assetPath, bool isRawAsset)
{ {
string shaderBundleName = AssetBundleGrouperSettingHelper.CollectShaderBundleName(assetPath); string shaderBundleName = AssetBundleGrouperHelper.CollectShaderBundleName(assetPath);
if (string.IsNullOrEmpty(shaderBundleName) == false) if (string.IsNullOrEmpty(shaderBundleName) == false)
return shaderBundleName; return shaderBundleName;
@ -205,7 +205,7 @@ namespace YooAsset.Editor
{ {
IPackRule packRuleInstance = AssetBundleGrouperSettingData.GetPackRuleInstance(PackRuleName); IPackRule packRuleInstance = AssetBundleGrouperSettingData.GetPackRuleInstance(PackRuleName);
string bundleName = packRuleInstance.GetBundleName(new PackRuleData(assetPath, CollectPath, grouper.GrouperName)); string bundleName = packRuleInstance.GetBundleName(new PackRuleData(assetPath, CollectPath, grouper.GrouperName));
return AssetBundleGrouperSettingHelper.CorrectBundleName(bundleName, isRawAsset); return AssetBundleGrouperHelper.CorrectBundleName(bundleName, isRawAsset);
} }
} }
private List<string> GetAssetTags(AssetBundleGrouper grouper) private List<string> GetAssetTags(AssetBundleGrouper grouper)

View File

@ -6,7 +6,7 @@ using UnityEditor;
namespace YooAsset.Editor namespace YooAsset.Editor
{ {
public static class AssetBundleGrouperSettingHelper public static class AssetBundleGrouperHelper
{ {
/// <summary> /// <summary>
/// 收集着色器的资源包名称 /// 收集着色器的资源包名称

View File

@ -9,7 +9,7 @@ namespace YooAsset
public static void InitEditorPlayMode(bool enableAddressable) public static void InitEditorPlayMode(bool enableAddressable)
{ {
AssetBundleGrouperSettingHelperClassType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleGrouperSettingHelper"); AssetBundleGrouperSettingHelperClassType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleGrouperHelper");
InvokePublicStaticMethod(AssetBundleGrouperSettingHelperClassType, "InitEditorPlayMode", enableAddressable); InvokePublicStaticMethod(AssetBundleGrouperSettingHelperClassType, "InitEditorPlayMode", enableAddressable);
} }
public static string ConvertLocationToAssetPath(string location) public static string ConvertLocationToAssetPath(string location)