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.07k stars 1.92k forks source link

layouts do not refresh when subnodes with layout are hidden #10886

Open Zhmz opened 2 years ago

Zhmz commented 2 years ago

Cocos Creator version

3.6.0

System information

All

Issue description

4971b7a66bfa4a0637d713e3c3cf16c0_ when the layout3 is hidden, the layout2 cannot still align to center.

Relevant error log output

No response

Steps to reproduce

  1. create layout1
  2. create layout2 and layout3 as children of layout1
  3. hide layout3
  4. find that layout2 cannot align to center

Minimal reproduction project

No response

Zhmz commented 2 years ago

related PR(probable cause): https://github.com/cocos/cocos-engine/pull/9914

jareguo commented 2 years ago

PR 合并到了 2.8,但 2.4.9 还是有用户报。https://forum.cocos.org/t/topic/135553

但是我认为这个问题不应该直接修复,如果引擎从始至终都这样,修复了会对兼容性造成破坏