Refactor: Only recreate runtime schedule context if the scene changes

This commit is contained in:
2026-04-27 16:29:51 +02:00
parent 4a3d44513e
commit d1b2a31238

View File

@@ -5191,9 +5191,11 @@ export class RuntimeHost {
return;
}
this.runtimeScheduleSyncContext ??= createRuntimeScheduleSyncContext(
this.runtimeScene
);
if (this.runtimeScheduleSyncContext?.runtimeScene !== this.runtimeScene) {
this.runtimeScheduleSyncContext = createRuntimeScheduleSyncContext(
this.runtimeScene
);
}
const syncResult = syncRuntimeSceneScheduleToClock({
runtimeScene: this.runtimeScene,