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 PointInTimeAccessor for lock-free parallel reads); Entities (the view's matched set, for a QuerySystem); DeltaTime (seconds since the last tick); and SpatialGrid (assign a SimTier per cell, read tier budgets).

It also carries the escape hatches from the one-transaction-per-tick default: typed event queues for inter-system signalling, and side transactionsctx.CreateSideTransaction(DurabilityMode.Immediate, DurabilityDiscipline.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.
  • Transactionctx.Transaction is the system's; ctx.CreateSideTransaction opens another.
  • PointInTimeAccessorctx.Accessor, for parallel reads across worker threads.

In the API

Learn & use