@internal Waits for Unity and Il2Cpp native libraries to be loaded and initialized.
()
| 10612 | } |
| 10613 | /** @internal Waits for Unity and Il2Cpp native libraries to be loaded and initialized. */ |
| 10614 | static async initialize() { |
| 10615 | if (Process.platform == "darwin") { |
| 10616 | let il2cppModuleName = Process.findModuleByAddress(Module.findExportByName(null, "il2cpp_init") ?? NULL)?.name; |
| 10617 | if (il2cppModuleName == undefined) { |
| 10618 | il2cppModuleName = await (0, native_wait_1.forModule)("UnityFramework", "GameAssembly.dylib"); |
| 10619 | } |
| 10620 | Reflect.defineProperty(Il2Cpp, "moduleName", { value: il2cppModuleName }); |
| 10621 | } |
| 10622 | else { |
| 10623 | await (0, native_wait_1.forModule)(this.moduleName); |
| 10624 | } |
| 10625 | if (Il2Cpp.Api._getCorlib().isNull()) { |
| 10626 | await new Promise(resolve => { |
| 10627 | const interceptor = Interceptor.attach(Il2Cpp.Api._init, { |
| 10628 | onLeave() { |
| 10629 | interceptor.detach(); |
| 10630 | setImmediate(resolve); |
| 10631 | } |
| 10632 | }); |
| 10633 | }); |
| 10634 | } |
| 10635 | } |
| 10636 | /** */ |
| 10637 | static installExceptionListener(targetThread = "current") { |
| 10638 | const threadId = Process.getCurrentThreadId(); |
no test coverage detected