Reactive data binding from Unity DOTS to UI Toolkit. One-line entity, singleton and query bindings, change-detected and source-generated with zero reflection. Declarative UXML syntax, 9 demos.Driving a UI from DOTS means writing the same sync loop over and over: query the entity, read the component, copy the value into a label — every frame, for every stat. Add a health bar, an ammo counter, and a score, and you are maintaining a hand-rolled HUD system that breaks every time the data model shifts. Unity's own runtime binding can't help here: it reads managed objects, and your gameplay state lives in unmanaged ECS chunks it cannot see.ECS Bridge is the binding layer DOTS never had. Mark a component, bind a VisualElement to a field, and it stays in sync — change-detected so unchanged values cost nothing, source-generated so the hot path stays Burst-friendly with zero reflection. The registry installs itself the first time you bind, ticks once per frame, and auto-disposes when an element leaves the panel.One line per binding.healthLabel.BindComponent(entity, h => h.Current, BindTarget.Text, "HP: {0}");healthBar.BindComponent(entity, h => (float)h.Current / h.Max, BindTarget.StyleWidthPercent);hudPanel.BindComponentToClass(entity, h => h.Current * 5 < h.Max, "low-health");Read any field through a strongly-typed lambda and write it to label text, a style value, a USS class, or visibility. Rename the field and the binding follows — no string paths, no runtime "field not found" surprises.Singletons and global state.Bind a label straight to an ECS singleton with BindSingleton — ideal for score, wave number, or any game-state component, with no entity reference needed. For state that doesn't live on an entity at all — locale, settings, debug flags — ReactiveState gives you an observable value with BindReactive and BindReactiveToClass, updated event-driven with zero per-frame cost while nothing changes.Queries and aggregations.Drive a label from a whole EntityQuery, not just one entity. BindCount, BindAny, and BindAggregate (Sum, Average, Min, Max) recompute as entities spawn and despawn. Bind a query straight to a ListView, ScrollView, or MultiColumnListView and the collection follows the world.Events, thresholds, and async.React to change instead of polling: OnComponentChanged, OnComponentThresholdCrossed, OnComponentIncreased / OnComponentDecreased, plus entity-lifecycle hooks OnEntityCreated and OnEntityDestroyed. Prefer to await? WhenComponentChangedAsync, WhenComponentThresholdCrossedAsync, and WhenEntityCreatedAsync return tasks with full cancellation support.Two-way and commands.UI can write back to ECS. BindTwoWayViaECB routes edits through an EntityCommandBuffer so writes coexist safely with running systems, and Button.BindCommand / BindCommandSingleton wire a button straight to a gameplay action.Author HUDs in UXML.Skip the per-label C# entirely — put the binding in the markup:Then activate the whole document with a single root.BindEcsDocument(world, ("player", entity)) call. Malformed or unresolved markers warn once and skip — they never throw.Change-detected, zero-allocation hot path.Every binding supports three update strategies — Polling, Change Detection (the default), and Manual — switchable live with SetStrategy. Change detection suppresses writes for values that didn't move, so a thousand idle bindings cost almost nothing. Built-in Unity.Profiling markers and per-frame diagnostics (TicksThisFrame, WritesThisFrame, SkippedThisFrame) show exactly what the registry is doing.See every binding live.Window > KrookedLilly > ECS Bridge Inspector lists every active binding with its target, strategy, and entity, plus running tick and write counters and name/strategy filters — for leak hunting and for confirming a binding is actually firing.Nine demo scenes included.HealthBar — three bindings on one entity (label, bar fill, low-health USS class). ScoreCounter — a singleton-driven score. PlayerHUD — five concurrent bindings across an entity, a singleton, and a USS class. AggregationShowcase — Count / Sum / Average / Min / Max / Any from one query. ReactiveState — non-ECS locale and debug-level globals. ComputedField — [BindableComputed] properties as binding sources. StressTest — 1000+ entities, aggregations staying reactive while change detection saves cost on idle frames. UpdateStrategyComparison — Polling vs Change Detection vs Manual side by side. UxmlBinding — a HUD authored entirely in UXML @ecs: markers. Every scene ships with controller scripts, UXML, USS, and panel settings.Part of the UI Toolkit Components suite.ECS Bridge is one of the KrookedLilly UI Toolkit Components. If you own sibling assets from the suite, cross-asset integration setup lives in one place — the unified Tools > KrookedLilly > Setup windowBuilds for every platform.Builds clean under IL2CPP and uses the standard Unity AOT path that runs on desktop, iOS, Android, WebGL, and consoles. A bundled link.xml protects the runtime assembly and the source-generated accessors from managed-code stripping; the troubleshooting guide covers the rare project that needs more.Full C# source.Complete C# source with XML documentation on every public API. The only binary is the Roslyn source generator that turns [BindableComponent] into Burst-friendly accessors — Unity requires source generators to ship as precompiled analyzers, so it travels as a labelled DLL inside the package.BindingsBindComponent(entity, read, target, format?) — entity field to text, value, style width/height percent, or any style propertyBindComponentToClass(entity, predicate, "class") — bool projection to a USS class toggleVisibility via BindTarget.Display; enum-projection overload; [BindableComputed] properties usable as sourcesBindSingleton(read, target, format?) — ECS singleton to an element, no entity neededEvery Bind* returns a BindingHandle; auto-disposes on DetachFromPanelEvent.Throttled(ms) modifier on any handleQueries, aggregations & collectionsBindCount, BindAny, BindAggregate (Sum / Average / Min / Max) over an EntityQueryBindQuery for ListView, ScrollView, and MultiColumnListView (per-column specs)BindBufferCount, BindBufferAggregate for DynamicBuffer scalarsReactive, events & asyncReactiveState global state with BindReactive / BindReactiveToClassOnComponentChanged, OnComponentThresholdCrossed, OnComponentIncreased / OnComponentDecreasedOnEntityCreated, OnEntityDestroyed, OnEntityLifecycleWhenComponentChangedAsync, WhenComponentThresholdCrossedAsync, WhenEntityCreatedAsync (CancellationToken-aware)Two-way & commandsBindTwoWayViaECB(entity, read, writeBack) — UI edits routed through an EntityCommandBufferDirect-EntityManager two-way for simple casesButton.BindCommand / BindCommandSingletonDeclarative UXMLtext="@ecs:Component.Field[,Field2] [of #entity] [as 'format']" markersroot.BindEcsDocument(world, (name, entity)) resolves the whole document in one callText target in v1.0; malformed markers warn once and skipUpdate & diagnosticsUpdate strategies: Polling, Change Detection (default), Manual; live SetStrategyUnity.Profiling.ProfilerMarkers on TickAll / BindingTick / BindingForceUpdatePer-frame TicksThisFrame / WritesThisFrame / SkippedThisFrameWindow > KrookedLilly > ECS Bridge Inspector — per-binding list, counters, filtersEdit > Project Settings > KrookedLilly > ECS Bridge — default strategy, throttle, loggingSource generator[BindableComponent] emits Burst-friendly field accessors — no reflection on the hot pathSupports primitive fields, Color, float2 / float3 / float4, and [BindableComputed] propertiesShips as a Roslyn analyzer DLL (the RoslynAnalyzer asset label) inside the packageIncluded demosHealthBar, ScoreCounter, PlayerHUD, AggregationShowcase, ReactiveState, ComputedField, StressTest, UpdateStrategyComparison, UxmlBindingGenerate scenes via Tools > KrookedLilly > Generate ECS Bridge Demo ScenesCompatibilityUnity 6.3 (6000.3) or newerRequires com.unity.entities 1.3.15+ (Entities 1.4 preview not yet supported)URP or Built-in render pipelineMono + IL2CPP (Standalone verified; iOS / Android / WebGL / consoles via the standard AOT path)Full C# source; the source generator ships as a Roslyn analyzer DLLXML documentation on all public APIsAI (Claude Code) was used as a development assistant throughout the package creation process. This includes code generation, architecture design, writing unit tests, documentation authoring, and debugging. All AI-generated code was reviewed, tested, and validated by the developer. The final package is 100% human-supervised C# source code with no AI runtime components.


