MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / initialize

Method initialize

Il2cppHook/_Ufunc.js:10614–10635  ·  view source on GitHub ↗

@internal Waits for Unity and Il2Cpp native libraries to be loaded and initialized.

()

Source from the content-addressed store, hash-verified

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();

Callers 2

performMethod · 0.95
cModuleMethod · 0.45

Calls 3

isNullMethod · 0.80
_getCorlibMethod · 0.80
attachMethod · 0.45

Tested by

no test coverage detected