场景移除时, 清理系统
This commit is contained in:
@@ -65,6 +65,15 @@ export class EntityProcessorList {
|
||||
*/
|
||||
public end(): void {
|
||||
// 清理处理器
|
||||
for (const processor of this._processors) {
|
||||
try {
|
||||
processor.update();
|
||||
} catch (error) {
|
||||
EntityProcessorList._logger.error(`Error in processor ${getSystemInstanceTypeName(processor)}:`, error);
|
||||
}
|
||||
}
|
||||
this._isDirty = false;
|
||||
this._processors.length = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user