MCPcopy Create free account
hub / github.com/esengine/esengine / markDirty

Method markDirty

packages/core/src/ECS/Entity.ts:606–615  ·  view source on GitHub ↗

* @zh 标记组件为已修改 * @en Mark component(s) as modified * * @zh 便捷方法,自动从场景获取当前 epoch 并标记组件。用于帧级变更检测系统。 * @en Convenience method that auto-gets epoch from scene and marks components. Used for frame-level change detection system. * * @param components - @zh 要标记的组件 @en Componen

(...components: Component[])

Source from the content-addressed store, hash-verified

604 * ```
605 */
606 public markDirty(...components: Component[]): void {
607 if (!this.scene) {
608 return;
609 }
610
611 const epoch = this.scene.epochManager.current;
612 for (const component of components) {
613 component.markDirty(epoch);
614 }
615 }
616
617 /**
618 * @zh 移除指定的组件

Callers 6

_rebuildSystemsCacheMethod · 0.45
setPositionMethod · 0.45
setVelocityMethod · 0.45

Calls

no outgoing calls

Tested by 2

setPositionMethod · 0.36
setVelocityMethod · 0.36