Init
This commit is contained in:
25
Assets/ThirdParty/YooAsset/2.3.17/Extension Sample/Editor/ClearBuildCache/ClearBuildCache.cs
vendored
Normal file
25
Assets/ThirdParty/YooAsset/2.3.17/Extension Sample/Editor/ClearBuildCache/ClearBuildCache.cs
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
internal class ClearBuildCacheWindow
|
||||
{
|
||||
[MenuItem("Tools/Clear Build Cache", false, 2)]
|
||||
public static void OpenWindow()
|
||||
{
|
||||
// 清空SBP构建缓存
|
||||
UnityEditor.Build.Pipeline.Utilities.BuildCache.PurgeCache(false);
|
||||
|
||||
// 删除AssetDependDB文件
|
||||
string projectPath = YooAsset.Editor.EditorTools.GetProjectPath();
|
||||
string databaseFilePath = $"{projectPath}/Library/AssetDependencyDB";
|
||||
if (File.Exists(databaseFilePath))
|
||||
{
|
||||
File.Delete(databaseFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user