Skip to content

Commit

Permalink
fix ui-opacity
Browse files Browse the repository at this point in the history
fix the render.node._uiProps.localOpacity only update on native.
  • Loading branch information
yoki0805 committed Oct 11, 2024
1 parent ecf0b35 commit 10a7fb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cocos/2d/components/ui-opacity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export class UIOpacity extends Component {
// there is a just UIRenderer but no UIOpacity on the node, we should just transport the parentOpacity to the node.
render.renderEntity.localOpacity = parentOpacity;
}
render.node._uiProps.localOpacity = render.renderEntity.localOpacity;
if (JSB) {
render.node._uiProps.localOpacity = render.renderEntity.localOpacity;
}
//No need for recursion here. Because it doesn't affect the capacity of the child nodes.
return;
}
Expand Down

0 comments on commit 10a7fb7

Please sign in to comment.