Table of Contents

TickContext

In one line: what a system's Execute receives each tick — its transaction, its read accessor, its entities, the frame's delta time, and the escape hatches.

A system never creates a unit of work or calls Commit — it is handed a TickContext and works through it. The context exposes: Transaction (the system's own per-tick transaction, committed for you by the scheduler); Accessor (a per-worker EntityAccessor for a parallel QuerySystem that writes no Versioned component — Open/OpenMut without per-entity dictionary lookups; null otherwise); Entities (the view's matched set, for a QuerySystem); DeltaTime (seconds since the last tick); SpatialGrid (assign a SimTier per cell, read tier budgets); and Commands (a per-worker-slot handle for queuing deferred spawns and destroys from inside a parallel chunk).

It also carries the escape hatches from the one-transaction-per-tick default: typed event queues for inter-system signalling, and side transactions — ctx.CreateSideTransaction(DurabilityMode.Immediate, CommitDiscipline.Commit) opens an independent transaction mid-tick for an immediate, ACID write (a player purchase, a teleport) that must not ride the tick's shared commit.

How it relates

  • System — receives a TickContext in Execute; it is the system's window on the world.
  • Tick — one context per system per tick; side transactions and event queues are how you step outside the default.
  • Transaction — ctx.Transaction is the system's; ctx.CreateSideTransaction opens another.
  • EntityAccessor — ctx.Accessor, for parallel chunks that write no Versioned component.

In the API

Learn & use