修复响应式查询缓存失效和测试隔离问题
This commit is contained in:
@@ -554,6 +554,9 @@ export abstract class EntitySystem<
|
||||
|
||||
try {
|
||||
this.onBegin();
|
||||
// 清除持久缓存,确保每次update都重新查询并检测实体变化
|
||||
// 这对于响应式查询正确工作至关重要
|
||||
this._entityCache.invalidate();
|
||||
// 查询实体并存储到帧缓存中
|
||||
this._entityCache.frame = this.queryEntities();
|
||||
entityCount = this._entityCache.frame.length;
|
||||
|
||||
Reference in New Issue
Block a user