From 95c599b1dac883c8ea083140d41244ce3a48e6f0 Mon Sep 17 00:00:00 2001 From: js6pak Date: Fri, 6 May 2022 13:51:47 +0200 Subject: [PATCH] Run basic AttributeRestoration for cpp2il --- BepInEx.IL2CPP/ProxyAssemblyGenerator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BepInEx.IL2CPP/ProxyAssemblyGenerator.cs b/BepInEx.IL2CPP/ProxyAssemblyGenerator.cs index be3d8b3..fbc0c77 100644 --- a/BepInEx.IL2CPP/ProxyAssemblyGenerator.cs +++ b/BepInEx.IL2CPP/ProxyAssemblyGenerator.cs @@ -12,6 +12,7 @@ using BepInEx.Logging; using Cpp2IL.Core; using HarmonyLib; using Il2CppDumper; +using LibCpp2IL; using Mono.Cecil; using UnhollowerBaseLib; using Logger = BepInEx.Logging.Logger; @@ -313,6 +314,8 @@ internal static class ProxyAssemblyGenerator sourceAssemblies = Cpp2IlApi.MakeDummyDLLs(); + Cpp2IlApi.RunAttributeRestorationForAllAssemblies(null, parallel: LibCpp2IlMain.MetadataVersion >= 29 || LibCpp2IlMain.Binary!.InstructionSet is InstructionSet.X86_32 or InstructionSet.X86_64); + Cpp2IlApi.DisposeAndCleanupAll(); }