fix(core): 修复 PerformanceMonitor 未遵循 Core debug 参数的问题 (#219)
- Core 传递 debug 配置到 WorldManager - WorldManager 传递 debug 配置到 World - World 在 debug=true 时为 Scene 注册并启用 PerformanceMonitor - new Scene 的情况默认未开启,但暴露了 `performanceMonitor` 由使用者处理
This commit is contained in:
@@ -108,9 +108,10 @@ export class WorldManager implements IService {
|
||||
throw new Error(`已达到最大World数量限制: ${this._config.maxWorlds}`);
|
||||
}
|
||||
|
||||
// 优先级:config.debug > WorldManager.debug > 默认
|
||||
const worldConfig: IWorldConfig = {
|
||||
name: worldId,
|
||||
...(this._config.debug !== undefined && { debug: this._config.debug }),
|
||||
debug: config?.debug ?? this._config.debug ?? false,
|
||||
...(config?.maxScenes !== undefined && { maxScenes: config.maxScenes }),
|
||||
...(config?.autoCleanup !== undefined && { autoCleanup: config.autoCleanup })
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user