Refactor: Only recreate editor simulation context if the scene changes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user