mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-29 12:41:00 +00:00
update editor code
This commit is contained in:
@@ -293,7 +293,10 @@ namespace YooAsset.Editor
|
||||
// 根据规则设置获取资源包名称
|
||||
IPackRule packRuleInstance = AssetBundleCollectorSettingData.GetPackRuleInstance(PackRuleName);
|
||||
string bundleName = packRuleInstance.GetBundleName(new PackRuleData(assetPath, CollectPath, group.GroupName));
|
||||
return EditorTools.GetRegularPath(bundleName).ToLower();
|
||||
if(YooAssetSettingsData.Setting.RegularBundleName)
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_').Replace('.', '_').ToLower();
|
||||
else
|
||||
return EditorTools.GetRegularPath(bundleName).ToLower();
|
||||
}
|
||||
private List<string> GetAssetTags(AssetBundleCollectorGroup group)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,7 @@ namespace YooAsset.Editor
|
||||
{
|
||||
string IPackRule.GetBundleName(PackRuleData data)
|
||||
{
|
||||
string bundleName = StringUtility.RemoveExtension(data.AssetPath);
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_');
|
||||
return StringUtility.RemoveExtension(data.AssetPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +32,7 @@ namespace YooAsset.Editor
|
||||
|
||||
string IPackRule.GetBundleName(PackRuleData data)
|
||||
{
|
||||
string bundleName = Path.GetDirectoryName(data.AssetPath);
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_');
|
||||
return Path.GetDirectoryName(data.AssetPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +56,7 @@ namespace YooAsset.Editor
|
||||
if (Path.HasExtension(splits[0]))
|
||||
throw new Exception($"Not found root directory : {assetPath}");
|
||||
string bundleName = $"{data.CollectPath}/{splits[0]}";
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_');
|
||||
return bundleName;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -79,13 +77,11 @@ namespace YooAsset.Editor
|
||||
string collectPath = data.CollectPath;
|
||||
if (AssetDatabase.IsValidFolder(collectPath))
|
||||
{
|
||||
string bundleName = collectPath;
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_');
|
||||
return collectPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
string bundleName = StringUtility.RemoveExtension(collectPath);
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_');
|
||||
return StringUtility.RemoveExtension(collectPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,8 +122,7 @@ namespace YooAsset.Editor
|
||||
if (depends.Length != 1)
|
||||
throw new Exception($"{nameof(PackRawFile)} is not support estension : {extension}");
|
||||
|
||||
string bundleName = data.AssetPath;
|
||||
return EditorTools.GetRegularPath(bundleName).Replace('/', '_').Replace('.', '_');
|
||||
return data.AssetPath;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user