Hi, I noticed if I set “enabled” property to false inside onEnable, in future, if I set it back to true, the onEnable method will not be called.
You can try this component and see console.log will be displayed only once.
@ccclass('Test')
export class Test extends Component {
protected onLoad(): void {
this.schedule(() => {
this.enabled = true;
}, 3);
}
protected onEnable(): void {
this.enabled = false;
}
}