#18970·cocos-engine

安卓原生, 延迟激活子节点的渲染组件时, 节点上的透明度无法发挥作用.

Author: finscnCreated Sep 1, 2025Updated Sep 17, 2026
LabelsBugNeeds Triage

Cocos Creator version

3.8.7

System information

android

Issue description

触发场景:

1., 一个预制体里 跟节点A, 默认 action = true , opacity = 255 2. 节点A 有个子节点 icon , 默认 action = true, opacity = 100 3. 子节点 icon上有 sprite组件, 但是没有 spriteFrame. 运行时: 实例化预制体, 添加到场景里. 然后 延迟 一会儿 设置 spriteFrame , 透明度无效.

typescript
        const nodeA = cc.instantiate(testPrefab);
        nodeA.parent = containerNode;
        setTimeout(() => {
            nodeA.getChildByName("icon").getComponent(Sprite).spriteFrame = testFrame;
        }, 20);

如果 不延迟, 直接设置, 是没有 bug 的.

Relevant error log output

No response

Steps to reproduce

.

Minimal reproduction project

No response