Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cocos/2d/renderer/batcher-2d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,12 @@ export class Batcher2D implements IBatcher {
}
}

if (children.length > 0 && !node._static) {
let breakWalk = false;
const entity = render ? render.renderEntity : null;
if (entity && entity.renderEntityType === RenderEntityType.CROSSED) {
breakWalk = true;
}
if (!breakWalk && children.length > 0 && !node._static) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是同步native的逻辑,node._static的判断可以移除。目前是通过_static 实现类似breakWalk的逻辑。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是同步native的逻辑,node._static的判断可以移除。目前是通过_static 实现类似breakWalk的逻辑。

那 node._static 的意义是什么呢? 只给 非原生用的? 如果移除会不会引起其他问题?

for (let i = 0; i < children.length; ++i) {
const child = children[i];
this.walk(child, level);
Expand Down
Loading