* 执行所有系统的延迟命令 * Flush all systems' deferred commands * * 在帧末统一执行所有通过 CommandBuffer 提交的延迟操作。 * Execute all deferred operations submitted via CommandBuffer at end of frame.
(systems: readonly EntitySystem[])
| 574 | * Execute all deferred operations submitted via CommandBuffer at end of frame. |
| 575 | */ |
| 576 | private flushCommandBuffers(systems: readonly EntitySystem[]): void { |
| 577 | const flushHandle = ProfilerSDK.beginSample('Scene.flushCommandBuffers', ProfileCategory.ECS); |
| 578 | try { |
| 579 | for (const system of systems) { |
| 580 | try { |
| 581 | system.flushCommands(); |
| 582 | } catch (error) { |
| 583 | this._logger.error(`Error flushing commands for system ${system.systemName}:`, error); |
| 584 | } |
| 585 | } |
| 586 | } finally { |
| 587 | ProfilerSDK.endSample(flushHandle); |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | /** |
| 592 | * 处理系统执行错误 |
no test coverage detected