Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17115

V3.0. executeInEditMode weird behavior

$
0
0

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?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 17115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>