> For the complete documentation index, see [llms.txt](https://postica.gitbook.io/binding-system-3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://postica.gitbook.io/binding-system-3/tutorials/samples.md).

# Demo Scenes

Playable scenes and code you can copy.

The package ships samples in two ways.

Three scenes live in the package folder itself, so they need no import and can be opened straight from the Project window under `Packages ▸ Binding System ▸ Samples`. The scripts beside them, in `Samples/Scripts`, are always present too.

<table><thead><tr><th width="290">Scene</th><th>What it shows</th></tr></thead><tbody><tr><td><code>Samples/SimpleDemo/BindDemoSimple</code></td><td><a href="#simple-demo">Simple Demo</a>. Sliders, a door, a spawner and a palette asset. The shortest path from "what is a binding" to a scene that does something.</td></tr><tr><td><code>Samples/CozyNookDemo/CozyNookDemo</code></td><td><a href="#cozy-nook">Cozy Nook</a>. Small, and built to be read with the <a href="/binding-system-3/project-tools/diagnostics/scene-visualizer.md">Scene Visualizer</a> on.</td></tr><tr><td><code>Samples/CourtyardDemo/CourtyardDemo</code></td><td><a href="#courtyard">Courtyard</a>. A dusk courtyard, seventy odd objects, the whole thing driven from one <strong>Time Of Day</strong> <a href="/binding-system-3/overview/bind-variables.md">variable</a> and a slider.</td></tr></tbody></table>

The rest are package samples, so they land in `Assets` only when you ask for them.

**Package Manager ▸ Binding System ▸ Samples ▸ Import**

<figure><img src="https://3048705056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLUfBXR02sJ5i0MxwYbaV%2Fuploads%2FnTfAPDTjQuUTXLSDVGTj%2FScreenshot%202026-09-27%20at%2018.44.39.png?alt=media&amp;token=1512e343-4eb8-4b97-8073-40cf0f90571f" alt="" width="563"><figcaption><p>The Samples section of the Package Manager</p></figcaption></figure>

<table><thead><tr><th width="290">Sample</th><th>What it shows</th></tr></thead><tbody><tr><td><strong>Bindings Demo</strong></td><td><a href="#bindings-demo">A playable scene</a> built almost entirely out of bindings, with a Built-in and a URP variant.</td></tr><tr><td><strong>Additional Converters</strong></td><td>Two heavily commented <a href="/binding-system-3/reference/extending/converters.md">converters</a>.</td></tr><tr><td><strong>Additional Modifiers</strong></td><td>Six <a href="/binding-system-3/reference/extending/modifiers.md">modifiers</a> covering the shapes you are likely to need.</td></tr></tbody></table>

## Simple Demo

`Samples/SimpleDemo/BindDemoSimple.unity`

The smallest scene that is still a scene. A canvas of sliders drives a spawner, a door and a platform, and a `Palette` ScriptableObject drives the colour of everything on screen.

There is no code holding it together. `Spawner` has one `Spawn()` method and `Palette` is a plain asset with four colours and five gradients on it; everything between them is a [proxy binding](/binding-system-3/overview/proxy-bindings.md).

<table><thead><tr><th width="250">This</th><th width="230">follows</th><th>Worth noticing</th></tr></thead><tbody><tr><td>The spawned cube's <strong>mass</strong></td><td>the <strong>SpawnPointMassSlider</strong> value</td><td>A uGUI control as a source</td></tr><tr><td>The spawner's <strong>position</strong></td><td>the <strong>SpawnPointSlider</strong> value</td><td>The same, through a converter that makes a number into a <code>Vector3</code></td></tr><tr><td>The cube's <strong>material colour</strong></td><td>its own <strong>Rigidbody mass</strong></td><td>An object binding to itself. The heavier it is, the darker it goes</td></tr><tr><td>The first door's <strong>opening</strong></td><td>the <strong>ControlDoor</strong> slider</td><td>A field on a plain <code>MonoBehaviour</code> at the receiving end</td></tr><tr><td>The second door's <strong>opening</strong></td><td>the <strong>PlatformSlider</strong> lever in the scene</td><td>No UI at all. The source is a physical object</td></tr><tr><td>The second door's <strong>lock</strong></td><td>the platform's <strong>childCount</strong></td><td>A member nobody wrote for this, converted to a <code>bool</code>. Put something on the platform and the door unlocks</td></tr><tr><td>The button's highlighted, pressed, selected and disabled <strong>colours</strong></td><td>its own <strong>normal colour</strong></td><td>One colour to set, four that follow it, each through its own <a href="/binding-system-3/pipeline/modifier-catalogue/colors.md">colour modifier</a></td></tr><tr><td>Every readout <strong>label</strong></td><td>the value it reports</td><td>The slider, the cube's mass, the spawner's height, the door's state</td></tr><tr><td>Every label colour, material colour, button colour and particle gradient</td><td>the <code>Palette</code> asset</td><td>A <code>ScriptableObject</code> as a source. Nothing in the scene owns the theme</td></tr></tbody></table>

Change one colour on the `Palette` asset and the whole scene restyles itself, in the Scene view, with nothing playing. That is the point of the scene: a binding's source does not have to be a component, and an asset is a perfectly good one.

## Cozy Nook

`Samples/CozyNookDemo/CozyNookDemo.unity`

A garden nook: a table by a window, a sunflower, a pinwheel, a wind chime, a sundial, a reading lamp and a pitcher of water. Fifteen bindings, and not one line of code. It is the smallest scene that draws one of every arrow the [Scene Visualizer](/binding-system-3/project-tools/diagnostics/scene-visualizer.md) knows how to draw, which is what it is for.

<figure><img src="https://3048705056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLUfBXR02sJ5i0MxwYbaV%2Fuploads%2F8yp2zbXnwRdz0EJZgJiv%2FScreenshot%202026-09-28%20at%2017.50.19.png?alt=media&amp;token=27d888bc-5c64-4c4e-b856-a8c56f89bd49" alt=""><figcaption><p>The Cozy Nook scene with the Scene Visualizer on</p></figcaption></figure>

Everything updates at edit time, so the nook responds in the Scene view without entering play mode. There is nothing to press play for.

### How it is wired

Three [bind variables](/binding-system-3/overview/bind-variables.md) hold the state of the scene, and almost everything reads one of them.

<table><thead><tr><th width="180">Variable</th><th>What it means</th><th>What follows it</th></tr></thead><tbody><tr><td><strong>Time of Day</strong></td><td>The hour, from 0 to 24</td><td>The <strong>Sun</strong>'s rotation, and the night ambience <strong>volume</strong> through an <a href="/binding-system-3/pipeline/modifier-catalogue/numbers.md#evaluate-curve">Evaluate Curve</a></td></tr><tr><td><strong>Sunlight</strong></td><td>How strong the sun is</td><td>The <strong>Sunlight</strong> intensity, the readout <strong>text</strong>, and the meter's <strong>fill amount</strong> through a <a href="/binding-system-3/pipeline/modifier-catalogue/numbers.md#remap-range">Remap Range</a></td></tr><tr><td><strong>Breeze</strong></td><td>How much wind there is, from 0 to 1</td><td>The pinwheel <strong>Blades</strong> and the chime <strong>Tubes</strong> rotations, the <strong>WindZone</strong> main strength, and the falling leaves' <strong>gravity</strong> and <strong>emission rate</strong></td></tr></tbody></table>

The other five bindings are the shapes a variable cannot show you.

<table><thead><tr><th width="250">This</th><th width="230">follows</th><th>Why it is here</th></tr></thead><tbody><tr><td>The sunflower <strong>Head</strong>'s rotation</td><td>the <strong>Sun</strong>'s rotation</td><td>One object reading another directly, which is the plain case</td></tr><tr><td>The lamp <strong>Bulb</strong>'s intensity</td><td>the <strong>Dimmer</strong> slider's value</td><td>A <a href="/binding-system-3/overview/two-ways-to-bind.md">uGUI control as a source</a>, through a <a href="/binding-system-3/pipeline/modifier-catalogue/numbers.md#math-expression">Math Expression</a></td></tr><tr><td>The lamp <strong>Shade</strong>'s emission colour</td><td>the <strong>Dimmer</strong> slider's value</td><td>A fan: two bindings from the same source, and a <a href="/binding-system-3/overview/proxy-bindings.md">material property</a> at the other end</td></tr><tr><td>The <strong>WaterLevel</strong>'s scale</td><td><code>UnityEngine.Time.time</code></td><td>A <a href="/binding-system-3/overview/sources.md">static source</a>: no object at all</td></tr><tr><td>The <strong>WaterOnTable</strong>'s scale</td><td>the <strong>WaterLevel</strong>'s scale</td><td>Second link in the chain, not a second copy of the first</td></tr></tbody></table>

### Things to try

1. Turn on the [Scene Visualizer](/binding-system-3/project-tools/diagnostics/scene-visualizer.md) and look at the shape of it: three fans where the variables sit, a chain from the water level to the water on the table, and a fan where two bindings share the same slider.
2. Open **Window ▸ Binding System ▸ Bind Variables** and drag **Breeze**. The pinwheel, the chime, the wind zone and the falling leaves all move with it, in the Scene view, stopped.
3. Drag **Time of Day** and watch the sun swing while the ambience volume follows its own curve.
4. Select the **Shade** and look at its binding. It drives `_EmissionColor` on a material, which is a member no component declares.
5. Select the **WaterLevel** and look at its source. It is a type rather than an object.
6. Set the visualizer's **Scope** to **Selection** and click through the objects one at a time. It is the fastest way to read one object's wiring.
7. Right click the **Bulb**'s Light intensity field and choose **Disable Binding**. The lamp stops following the dimmer. Undo.

## Courtyard

`Samples/CourtyardDemo/CourtyardDemo.unity`

A dusk courtyard, seventy odd objects, driven from one **Time Of Day** [variable](/binding-system-3/overview/bind-variables.md) and a slider: sun angle and colour temperature, lamp intensity, the ambience volume, and nineteen lit windows whose emission colour is read out of a **Windows Light Color** gradient.

It is the scene to open when you want to see what a variable is worth. One number moves, and twenty nine bindings answer.

## Bindings Demo

A playable scene built almost entirely out of bindings, with a Built-in and a URP variant. Physics, input, UI and audio are wired together without a controller class in sight.

<figure><img src="https://3048705056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLUfBXR02sJ5i0MxwYbaV%2Fuploads%2FB4DVKenpMreV94XXjuiv%2FScreenshot%202026-09-28%20at%2018.33.40.png?alt=media&amp;token=77144e66-067d-4e8e-bf44-4a6dd0a3d1b0" alt=""><figcaption><p>The Bindings Demo scene</p></figcaption></figure>

### What to look at

<table><thead><tr><th width="290">Script</th><th>What it shows</th></tr></thead><tbody><tr><td><code>PhysicsBall</code></td><td>A component whose entire configuration is <code>ReadOnlyBind&#x3C;T></code> fields, including its physics material and enum settings. Also shows <code>[Bind]</code> with <code>[Range]</code> below it, so the range applies to the inner value.</td></tr><tr><td><code>CollisionMousePointer</code></td><td>Input as bindings: mouse position, button state, camera and layer mask all come in bound rather than being fetched.</td></tr><tr><td><code>PhysicsPlayerController</code></td><td>A controller that reads its inputs through bindings, so the same component works with mouse, keyboard or a UI.</td></tr><tr><td><code>GameManager</code>, <code>TriggersManager</code></td><td>How game state fans out to many listeners without either side naming the other.</td></tr><tr><td><code>PhysicsImpact</code>, <code>PhysicsProp</code></td><td>Small components whose reactions are configured rather than coded.</td></tr></tbody></table>

The scripts are commented with the reasoning, not just the mechanics. They are the clearest available answer to "how would I actually structure this?"

### Things to try in the scene

1. Open a component and turn a binding off. Type a value by hand. The scene keeps working: bindings are opt in, per instance.
2. Turn on [Live Debug](/binding-system-3/project-tools/diagnostics/live-debug.md) on a physics parameter and play. Watch the pipeline.
3. Open the [Dependency Graph](/binding-system-3/project-tools/diagnostics/dependency-graph.md) with the scene loaded. This is a scene worth seeing as a graph.
4. Open the [Bindings Monitor](/binding-system-3/project-tools/diagnostics/bindings-monitor.md) in play mode and sort by cost.

## Additional Converters

Two small, heavily commented [converters](/binding-system-3/reference/extending/converters.md):

<table><thead><tr><th width="290">Sample</th><th>What it shows</th></tr></thead><tbody><tr><td><code>EnumToIntConverter</code></td><td>The untyped-enum case, which is the interesting one.</td></tr><tr><td><code>HexColorConverter</code></td><td>An unsafe conversion done properly, with a fallback.</td></tr></tbody></table>

## Additional Modifiers

Six [modifiers](/binding-system-3/reference/extending/modifiers.md) covering the shapes you are likely to need:

<table><thead><tr><th width="290">Sample</th><th>What it shows</th></tr></thead><tbody><tr><td><code>RoundFloatModifier</code>, <code>CeilFloatModifier</code>, <code>FloorFloatModifier</code></td><td>The minimum a modifier can be.</td></tr><tr><td><code>StringPaddingModifier</code></td><td>Bindable parameters, an enum option, and a real <code>ShortDataDescription</code>.</td></tr><tr><td><code>TrimModifier</code></td><td>A string modifier with an inverse.</td></tr><tr><td><code>SampleLogModifier</code></td><td>A modifier that observes rather than transforms.</td></tr></tbody></table>

## The scripts that ship with the package

`Samples/Scripts` is not a package sample: it is part of the package, it always compiles, and it needs no import. It is worth reading for the same reason the demo scripts are.

<table><thead><tr><th width="290">Script</th><th>What it shows</th></tr></thead><tbody><tr><td><code>PIDController</code>, <code>Vector3PIDController</code></td><td>A PID controller written as a modifier, for a float and for a vector.</td></tr><tr><td><code>Modifiers/PropagateModifier</code>, <code>Modifiers/PropagateBoolModifier</code></td><td>Fanning one value out to many bindings from inside a modifier.</td></tr><tr><td><code>Common/BindBehaviour</code>, <code>Common/BindComponent</code></td><td>The base classes the demo components are built on.</td></tr><tr><td><code>Common/PhysicsDoor</code>, <code>Common/PhysicsLever</code>, <code>Common/PhysicsSlider</code></td><td>Small, bindable mechanisms. These are what the Simple Demo drives.</td></tr><tr><td><code>Common/WASDInputProvider</code></td><td>Input exposed as bindable members rather than polled.</td></tr><tr><td><code>TextFormatter</code>, <code>EaseFunction</code>, <code>HitAbsorber</code>, <code>RandomDestination</code></td><td>Odds and ends the demo scenes bind to.</td></tr></tbody></table>

## A five-minute tour

If you only have a few minutes and want to understand the point of the package:

1. Open `Samples/SimpleDemo/BindDemoSimple` and change a colour on its `Palette` asset. Nothing is playing, and the scene restyles.
2. Open `Samples/CozyNookDemo/CozyNookDemo` with the [Scene Visualizer](/binding-system-3/project-tools/diagnostics/scene-visualizer.md) on and drag the **Breeze** variable.
3. Import **Bindings Demo**, open the scene, and select a ball prefab. Look at how much of it is bound rather than assigned.
4. Find a component with no `Bind<T>` fields at all, right click one of its fields, choose **Enable Binding** and click the hexagon toggle. That is [proxy binding](/binding-system-3/overview/proxy-bindings.md).
5. Play the scene with the [Bindings Monitor](/binding-system-3/project-tools/diagnostics/bindings-monitor.md) open.

## Related pages

* [Scene Visualizer](/binding-system-3/project-tools/diagnostics/scene-visualizer.md): what Cozy Nook is built to show.
* [Bind Variables](/binding-system-3/overview/bind-variables.md): what Cozy Nook and Courtyard are built on.
* [Your First Binding](/binding-system-3/getting-started/first-binding.md): the same flow, on your own field.
* [Extending](/binding-system-3/reference/extending.md): the conventions the samples follow.
