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.23k stars 1.94k forks source link

[3.6] node with UIOpacity always interrupt without render componet #12549

Open xianyinchen opened 2 years ago

xianyinchen commented 2 years ago

Cocos Creator version

3.6.0

System information

Window11, iOS, Android

Issue description

if we have node tree like this. when you set opacity=0 for the first 'Node', it work on web platform, but not work on native platform.

企业微信截图_16614114022708

Relevant error log output

No response

Steps to reproduce

test project, click screen any where, the white block will disappear in web-mobile Disappear, but not work on window or iOS platform. TestOpacity.zip

Minimal reproduction project

No response

Zhmz commented 2 years ago

https://github.com/cocos/cocos-engine/pull/12533 point3

OnlyKoei commented 1 year ago

https://forum.cocos.org/t/topic/147022/ If the parent node does not have a rendering component added, the native platform display is not correct: 如果父节点没有添加渲染组件,原生平台显示不对,节点没有隐藏 image image

If the parent node has a rendering component added, the native platform and web platform display will be the same: 如果父节点添加了渲染组件,两个平台显示效果就一样。 image image

demo: NewProject_14.zip

LinYunMo commented 1 year ago

Due to native modification, if there is no uirenderer component, rendering information cannot be passed to the Native layer 由于原生化的修改,导致如果没有 uirenderer 组件,无法传递渲染信息到原生层