2022-11-05 22:22:39 +08:00
|
|
|
|
using HybridCLR.Editor.Link;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace HybridCLR.Editor.Commands
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public static class Il2CppDefGeneratorCommand
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[MenuItem("HybridCLR/Generate/Il2CppDef", priority = 104)]
|
|
|
|
|
public static void GenerateIl2CppDef()
|
|
|
|
|
{
|
|
|
|
|
var options = new Il2CppDef.Il2CppDefGenerator.Options()
|
|
|
|
|
{
|
2022-12-14 14:11:32 +08:00
|
|
|
|
UnityVersion = Application.unityVersion,
|
2023-01-05 21:38:32 +08:00
|
|
|
|
HotUpdateAssemblies = SettingsUtil.HotUpdateAssemblyNames,
|
2022-11-24 12:09:04 +08:00
|
|
|
|
OutputFile = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/il2cpp-config.h",
|
2023-01-05 21:38:32 +08:00
|
|
|
|
OutputFile2 = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/Il2CppCompatibleDef.cpp",
|
2022-11-05 22:22:39 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var g = new Il2CppDef.Il2CppDefGenerator(options);
|
|
|
|
|
g.Generate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|