cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.22k stars 1.94k forks source link

设置 `node.layer=0` 后, node的active改变时, layer没有被正确处理 #16884

Open finscn opened 6 months ago

finscn commented 6 months ago

Cocos Creator version

3.8.2

System information

all

Issue description

设置 node.layer=0 , 目的是 不渲染该node. 设置后可以实现"不渲染"的目的. 但是 node的active (也可能是父节点的active) 设置为false, 再还原回true时, 这个node 又被渲染了.

Relevant error log output

No response

Steps to reproduce

如上所述

Minimal reproduction project

No response

minggo commented 6 months ago

最好给个简单 demo,确保我们的操作和环境是一样的。