mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 17:50:15 +00:00
Update AssetBundleTools
StreamingAssets目录下增加了用于存放打包资源的总文件夹
This commit is contained in:
@@ -17,6 +17,14 @@ namespace YooAsset.Editor
|
||||
return $"{projectPath}/Bundles";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取流文件夹路径
|
||||
/// </summary>
|
||||
public static string GetStreamingAssetsFolderPath()
|
||||
{
|
||||
return $"{Application.dataPath}/StreamingAssets/YooAssets/";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取构建管线的输出目录
|
||||
/// </summary>
|
||||
@@ -30,8 +38,8 @@ namespace YooAsset.Editor
|
||||
/// </summary>
|
||||
public static void ClearStreamingAssetsFolder()
|
||||
{
|
||||
string streamingPath = Application.dataPath + "/StreamingAssets";
|
||||
EditorTools.ClearFolder(streamingPath);
|
||||
string streamingFolderPath = GetStreamingAssetsFolderPath();
|
||||
EditorTools.ClearFolder(streamingFolderPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -40,17 +48,17 @@ namespace YooAsset.Editor
|
||||
/// </summary>
|
||||
public static void DeleteStreamingAssetsIgnoreFiles()
|
||||
{
|
||||
string streamingPath = Application.dataPath + "/StreamingAssets";
|
||||
if (Directory.Exists(streamingPath))
|
||||
string streamingFolderPath = GetStreamingAssetsFolderPath();
|
||||
if (Directory.Exists(streamingFolderPath))
|
||||
{
|
||||
string[] files = Directory.GetFiles(streamingPath, "*.manifest", SearchOption.AllDirectories);
|
||||
string[] files = Directory.GetFiles(streamingFolderPath, "*.manifest", SearchOption.AllDirectories);
|
||||
foreach (var file in files)
|
||||
{
|
||||
FileInfo info = new FileInfo(file);
|
||||
info.Delete();
|
||||
}
|
||||
|
||||
files = Directory.GetFiles(streamingPath, "*.meta", SearchOption.AllDirectories);
|
||||
files = Directory.GetFiles(streamingFolderPath, "*.meta", SearchOption.AllDirectories);
|
||||
foreach (var item in files)
|
||||
{
|
||||
FileInfo info = new FileInfo(item);
|
||||
|
||||
Reference in New Issue
Block a user