update editor code

This commit is contained in:
hevinci
2022-12-21 12:04:56 +08:00
parent 4a158319e5
commit 66cd491493
4 changed files with 20 additions and 19 deletions
@@ -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;
}
}