Files
2025-10-31 15:31:34 +08:00

24 lines
786 B
C#

using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
public class BuildTool
{
[MenuItem("Tools/增量构建 %g")] // Ctrl+G (Windows) or Command+G (Mac)
public static void BuildIncremental()
{
CopyHotDll.CreateDllByte();
AddressableAssetSettings.BuildPlayerContent();
Debug.Log("Addressables 增量构建完成 (Ctrl+G)");
}
[MenuItem("Tools/全部重新打包 %#g")] // Ctrl+Shift+G (Windows) or Command+Shift+G (Mac)
public static void BuildClearCache()
{
CopyHotDll.CreateDllByte();
AddressableAssetSettings.CleanPlayerContent();
AddressableAssetSettings.BuildPlayerContent();
Debug.Log("Addressables 全部重新打包完成 (Ctrl+Shift+G)");
}
}