interface
TransmitStatsHot-path measurement counters returned by Transmit.stats.
snapshots: numberentries: numberbitsCleared: numbernsLast: numbernsMax: numberDocs / API / Modules / transmit
@s2script/sdk/transmit
per-client entity visibility filtering (Source2 CheckTransmit). Declarative rules: a plugin says "this entity is visible only to these viewer slots" and the engine-side hook enforces it every snapshot — zero JS runs in the per-client hot path.
import { TransmitStats } from "@s2script/sdk/transmit";Author-time types ship in the npm package; the engine injects the runtime at plugin load. Add @s2script/sdk to your plugin's dependencies.
Generated from the shipped type definitions.
TransmitStatsHot-path measurement counters returned by Transmit.stats.
snapshots: numberentries: numberbitsCleared: numbernsLast: numbernsMax: numberTransmitDeclarative per-client entity visibility: hide an entity from some viewers, enforced engine-side each snapshot.
import { Transmit } from "@s2script/sdk/transmit";
// examples/transmit-demo/src/plugin.ts:58 — show `prop` ONLY to one viewer slot
const ok = Transmit.setVisibleTo(prop, [slot]);setVisibleTo(entity: EntityRef, viewers: readonly number[]): booleanentity: it is transmitted ONLY to the given viewer
slots (an empty array = hidden from everyone). Multiple plugins AND-merge — an entity reaches a
viewer only if every plugin holding a rule on it allows that viewer. Returns false if the ref is
stale or the capability is unavailable/disabled. Throws RangeError on a slot outside [0, 64).reset(entity: EntityRef): booleanentity (visible to all again, as far as this plugin is
concerned). Returns false if the ref is stale or the capability is unavailable.resetAll(): voidstats(): TransmitStats