【BUG反馈】TilemMap 3.7.2 addUserNode接口的Node概率不显示

  • Creator 版本:3.7.2

  • 目标平台: 浏览器chrome 111版本

  • 重现方式:根据仓库源码https://github.com/cocos/cocos-test-projects
    修改1 将tiledLayer设为 Walls level2


    修改2 assets\cases\middleware\tiled-map\shield-node.ts

@ccclass('ShieldNode')
export class ShieldNode extends Component {
    @property({ type: TiledLayer })
    public tiledLayer: TiledLayer | null = null;
    @property({type: Prefab})
    public nodePrefab: Prefab | null = null;
    start () {
        this.initScene(this.nodePrefab!);
    }
    initScene (prefab: Prefab) {
        const posArr = [v2(-300, -200), v2(-150, 76), v2(-60, 54), v2(-248, -144), v2(89, 134)];
        const tmpP = new Vec3();
        for (let i = 0; i < 1; i++) {
            const shieldNode = instantiate(prefab);
            shieldNode.setPosition(300, 200);
            this.tiledLayer!.addUserNode(shieldNode);
            setTimeout(() => {
                // 取消注释后可显示
               // shieldNode.setPosition(300, 200);
            }
            , 0);
        }
    }
}
  • 编辑器操作系统: Windows 10
  • 重现概率:如上代码必现,其他位置偶现

类似bug tiledmap 接口不生效

3.8.6也有这个,不知道怎么回事