在编辑器模式中 如何触发onLoad

如题,是否能在编辑器模式下,触发脚本的onLoad的方法。

@jare 请大神指点迷津 :grin:

@Jare 估计忙不过来,还好我在Jare学到了,试试下面的方法

cc.Class({
    extends: cc.Component,
    //注意这里
    editor: {
        executeInEditMode: true,
    },
    
    onLoad: function () {
        cc.log('onLoad');
    },
});

:kissing_heart: