35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using UnityEditor;
|
||
|
||
namespace HybridCLR.Editor.Commands
|
||
{
|
||
public static class PrebuildCommand
|
||
{
|
||
/// <summary>
|
||
/// 按照必要的顺序,执行所有生成操作,适合打包前操作
|
||
/// </summary>
|
||
[MenuItem("HybridCLR/Generate/All", priority = 200)]
|
||
public static void GenerateAll()
|
||
{
|
||
BuildTarget target = EditorUserBuildSettings.activeBuildTarget;
|
||
CompileDllCommand.CompileDll(target);
|
||
Il2CppDefGeneratorCommand.GenerateIl2CppDef();
|
||
|
||
// 这几个生成依赖HotUpdateDlls
|
||
LinkGeneratorCommand.GenerateLinkXml(target);
|
||
|
||
// 生成裁剪后的aot dll
|
||
StripAOTDllCommand.GenerateStripedAOTDlls(target, EditorUserBuildSettings.selectedBuildTargetGroup);
|
||
|
||
// 桥接函数生成依赖于AOT dll,必须保证已经build过,生成AOT dll
|
||
MethodBridgeGeneratorCommand.GenerateMethodBridge(target);
|
||
ReversePInvokeWrapperGeneratorCommand.GenerateReversePInvokeWrapper(target);
|
||
AOTReferenceGeneratorCommand.GenerateAOTGenericReference(target);
|
||
}
|
||
}
|
||
}
|