Skip to content

renderEntityType 等于 RenderEntityType.CROSSED 时, 不再处理子节点.#63

Open
finscn wants to merge 1 commit intococos:v4.0.0from
finscn:patch-3
Open

renderEntityType 等于 RenderEntityType.CROSSED 时, 不再处理子节点.#63
finscn wants to merge 1 commit intococos:v4.0.0from
finscn:patch-3

Conversation

@finscn
Copy link

@finscn finscn commented Jan 30, 2026

这个 PR 是为了确保 web/小游戏 端 与 原生端逻辑一致.
原生代码里有类似逻辑.

image

虽然不明白 cocos 为什么这么设计, 以及 这个 CROSSED 到底啥意思.

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

这个 PR 是为了确保 web/小游戏 端 与 原生端逻辑一致.
原生代码里有类似逻辑.

虽然不明白 cocos 为什么这么设计, 以及 这个 CROSSED 到底啥意思
@star-e star-e requested a review from bofeng-song February 3, 2026 09:55
if (entity && entity.renderEntityType === RenderEntityType.CROSSED) {
breakWalk = true;
}
if (!breakWalk && children.length > 0 && !node._static) {
Copy link
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
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 的意义是什么呢? 只给 非原生用的? 如果移除会不会引起其他问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants