This commit is contained in:
xu_yanfeng 2025-02-11 20:41:40 +08:00
parent 110045b348
commit 8a8c9c92e8

View File

@ -27,7 +27,7 @@ function getButton(node: any, fillFn: boolean): FunctionInfo[] {
const ret: FunctionInfo[] = [];
for (let i = 0; i < arr.length; i++) {
const item = arr[i];
const compType = cc.js.getClassById(item._componentId);
const compType = cc.js._getClassById(item._componentId);
if (!compType) {
continue;
}
@ -47,6 +47,9 @@ function getButton(node: any, fillFn: boolean): FunctionInfo[] {
}
export function getCallbacks(node: any, code: ShowCode, fillFn: boolean = false): FunctionInfo[] {
if (node instanceof cc.Scene) {
return [];
}
if (code === ShowCode.ButtonClickEvents) {
return getButton(node, fillFn);
} else {