In CC 3.0. I created following component:
import { _decorator, Component } from 'cc';
const { ccclass, executeInEditMode } = _decorator;
@ccclass('TestUpdate')
@executeInEditMode
export class TestUpdate extends Component {
update (deltaTime: number) {
console.error('TestUpdate.update()');
}
}
When I attach it to the node, I don’t have any update loop on the component whether the node is selected or not. There are single calls when I click something in the editor or change focus of nodes, but I don’t see constant update loop.
However, when I add another one node with a particle system to the scene (it doesn’t matter 2D or 3D), I have an update loop on my component when the node with particle system is selected. And it stops when any other node is selected.
I believe, this is wrong behavior, as it completely different than it was on v2.4.
Any ideas on how to get it work?