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

Function OnButtonClick

Il2cppHook/_Ufunc.js:4310–4334  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4308}
4309exports.OnPointerClick = OnPointerClick;
4310const OnButtonClick = () => {
4311 A(Il2Cpp.Api.Button._OnPointerClick, (args) => {
4312 let current = args[0];
4313 let ButtonClickedEvent = new Il2Cpp.Button(current).m_OnClick;
4314 let gobj = getGameObject(current);
4315 let gObjPack;
4316 if (gobj != undefined)
4317 gObjPack = new Il2Cpp.GameObject(gobj);
4318 else
4319 throw new Error("Il2Cpp.GameObject is null");
4320 LOGH("\n[*] " + current + " ---> " + gObjPack.get_name() + " { G:" + gobj + " | T:" + gObjPack.get_transform().handle + " }");
4321 LOGO(" [-] InvokableCallList(" + findClass("InvokableCallList") + ") m_Calls " + ButtonClickedEvent.m_Calls.handle);
4322 setTimeout(() => ansItems(ButtonClickedEvent), 10);
4323 });
4324 function ansItems(event) {
4325 if (Process.arch != "arm")
4326 return;
4327 let persistentCalls = event.m_Calls.m_PersistentCalls;
4328 let executingCalls = event.m_Calls.m_ExecutingCalls;
4329 let runtimeCalls = event.m_Calls.m_RuntimeCalls;
4330 LOGD(`\t${parseList(persistentCalls).toSimpleString()}`);
4331 LOGD(`\t${parseList(executingCalls).toSimpleString()}`);
4332 LOGD(`\t${parseList(runtimeCalls).toSimpleString()}`);
4333 }
4334};
4335exports.OnButtonClick = OnButtonClick;
4336const HideClickedObj = (x, y) => {
4337 let m_ptr = find_method("UnityEngine.UI", "Button", "OnPointerClick", 1);

Callers

nothing calls this directly

Calls 5

LOGHFunction · 0.70
LOGOFunction · 0.70
ansItemsFunction · 0.70
get_nameMethod · 0.65
get_transformMethod · 0.65

Tested by

no test coverage detected