Skip to content

Commit 7a97bdd

Browse files
authored
Merge pull request #412 from js6pak/fix-attributes-on-cpp2il
Run basic AttributeRestoration for cpp2il
2 parents 5ff56c2 + 95c599b commit 7a97bdd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

BepInEx.IL2CPP/ProxyAssemblyGenerator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Cpp2IL.Core;
1313
using HarmonyLib;
1414
using Il2CppDumper;
15+
using LibCpp2IL;
1516
using Mono.Cecil;
1617
using UnhollowerBaseLib;
1718
using Logger = BepInEx.Logging.Logger;
@@ -313,6 +314,8 @@ private void GenerateAssembliesInternal(AppDomainListener listener,
313314

314315
sourceAssemblies = Cpp2IlApi.MakeDummyDLLs();
315316

317+
Cpp2IlApi.RunAttributeRestorationForAllAssemblies(null, parallel: LibCpp2IlMain.MetadataVersion >= 29 || LibCpp2IlMain.Binary!.InstructionSet is InstructionSet.X86_32 or InstructionSet.X86_64);
318+
316319
Cpp2IlApi.DisposeAndCleanupAll();
317320
}
318321

0 commit comments

Comments
 (0)