Glossary
Docs / Overview / Glossary
Terminology reference for ZenECS concepts and APIs.
Core Concepts
Entity
A unique identifier representing a game object. Entities have no data or behavior—they're just IDs that can have components attached.
Entity entity;
using (var cmd = world.BeginWrite())
{
entity = cmd.CreateEntity(); // Just an ID
}
Related: Entities
Component
A pure data structure (struct) that defines properties. Components have no methods or behavior—they're just data.
public struct Position { public float X, Y, Z; }
Related: Components
System
Pure logic that operates on entities with specific component combinations. Systems query entities and transform their components.
public class MovementSystem : ISystem
{
public void Run(IWorld world, float deltaTime) { }
}
Related: Systems
World
A container for entities, components, and systems. Represents an isolated simulation space.
var world = kernel.CreateWorld(null, "GameWorld");
Related: World
Kernel
Top-level manager that manages multiple worlds and coordinates the game loop.
var kernel = new Kernel();
Related: EcsKernel
API Terms
Query
Find entities that have specific component combinations.
foreach (var (entity, pos, vel) in world.Query<Position, Velocity>())
{
// Entities with both Position and Velocity
}
Related: Query API
Command Buffer
Batch structural changes (entity creation/destruction, component add/remove) and apply at safe boundaries.
using (var cmd = world.BeginWrite())
{
var entity = cmd.CreateEntity();
cmd.AddComponent(entity, new Position(0, 0));
}
Related: Command Buffer
Message Bus
Pub/sub messaging system for event-driven architecture.
world.Publish(new DamageMessage { Target = entity, Amount = 10 });
Related: Message Bus
Binding
Connect ECS data to view layer (Unity GameObjects, UI, etc.) reactively.
public class PositionBinder : IBinder<Position>
{
public void OnDelta(ComponentDelta<Position> delta) { }
}
Related: Binding
System Groups
FixedGroup
Systems that run during fixed-step simulation. Use for deterministic gameplay logic.
[FixedGroup]
public class PhysicsSystem : ISystem { }
Related: System Runner
FrameGroup
Systems that run during variable-timestep frame updates. Use for presentation and UI.
[FrameGroup]
public class CameraSystem : ISystem { }
Related: System Runner
Unity-Specific Terms
EcsDriver
Unity MonoBehaviour that manages kernel lifecycle and bridges Unity's frame callbacks.
[RequireComponent(typeof(EcsDriver))]
public class GameBootstrap : MonoBehaviour { }
Related: Unity Adapter Overview
EntityLink
Unity MonoBehaviour that links a GameObject to an ECS entity.
var link = gameObject.AddComponent<EntityLink>();
link.Attach(world, entity);
Related: View Binder
EntityBlueprint
ScriptableObject asset that defines entity configuration (components, contexts, binders).
[CreateAssetMenu]
public class PlayerBlueprint : EntityBlueprint { }
Related: Blueprint Components
Advanced Concepts
Snapshot
Serialized world state for save/load functionality.
world.Save(stream); // Create snapshot
world.Load(stream); // Restore from snapshot
Related: Snapshot I/O
Migration
Version compatibility system for snapshots.
world.RegisterMigration<OldComponent, NewComponent>(migrate);
Related: Migration & PostMig
Hook
Callback system for intercepting component operations.
world.Hooks.AddWritePermission((entity, type) => true);
Related: World Hook
Validator
Validation function for component values.
world.Hooks.AddValidator<Health>(health => health.Current >= 0);
Related: Write Hooks & Validators
Common Patterns
Query Pattern
Find and process entities with specific components.
foreach (var (entity, component) in world.Query<Component>())
{
// Process entity
}
Message Pattern
Publish events and react in systems.
// Publish
world.Publish(new EventMessage());
// Subscribe (in system)
foreach (var msg in world.ConsumeMessages<EventMessage>())
{
// React to event
}
Binding Pattern
Reactively update views when components change.
public class ViewBinder : IBinder<Position>
{
public void OnDelta(ComponentDelta<Position> delta)
{
if (delta.IsAdded || delta.IsChanged)
{
transform.position = delta.NewValue;
}
}
}
See Also
- ZenECS at a Glance - Feature overview
- What is ECS? - ECS introduction
- Architecture - Technical details