diff --git a/src/world/runtime/runtime-world.ts b/src/world/runtime/runtime-world.ts index 19d49e7..e869dcf 100644 --- a/src/world/runtime/runtime-world.ts +++ b/src/world/runtime/runtime-world.ts @@ -125,7 +125,6 @@ export class RuntimeWorld implements IRuntimeWorld, IMutableWorld { for (scheduler of this.config.stateSchedulers.values()) { for (system of scheduler.getSystems()) { - system.setRuntimeContext(this); this.systems.add(system); } } @@ -199,6 +198,7 @@ export class RuntimeWorld implements IRuntimeWorld, IMutableWorld { let query, system; for (system of this.config.defaultScheduler.getSystems()) { + system.setRuntimeContext(this); for (query of getQueriesFromSystem(system)) { this.queries.add(query); }