Refactor: Only recreate editor simulation context if the scene changes

This commit is contained in:
2026-04-27 16:29:55 +02:00
parent d1b2a31238
commit 6628019296

View File

@@ -354,9 +354,13 @@ export class EditorSimulationController {
}
try {
this.runtimeScheduleSyncContext ??= createRuntimeScheduleSyncContext(
this.runtimeScene
);
if (
this.runtimeScheduleSyncContext?.runtimeScene !== this.runtimeScene
) {
this.runtimeScheduleSyncContext = createRuntimeScheduleSyncContext(
this.runtimeScene
);
}
syncRuntimeSceneToClock(
this.runtimeScene,
this.currentClock,