> 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/reference/extending/field-rerouting.md).

# Field Rerouting

Redirect a bound field to another member, project wide.

A field and a property over it are not equivalent. `_health` stores a number; `Health` clamps it, raises an event and updates a UI. A binding pointed at the field skips all of that.

**Field rerouting** says, once and for the whole project: any binding on this field actually goes through that member instead.

## The problem it solves

```csharp
public class Health : MonoBehaviour
{
    [SerializeField] private float _current;

    public float Current
    {
        get => _current;
        set
        {
            _current = Mathf.Clamp(value, 0, max);
            OnChanged?.Invoke(_current);
        }
    }
}
```

`_current` is the serialized field, so it is what a proxy binding attaches to. Writing to it directly skips the clamp and the event, which is not what anybody intended. A route from `_current` to `Current` fixes every such binding at once, without touching the bindings themselves.

## Setting a route

{% tabs %}
{% tab title="From code" %}

```csharp
using Postica.BindingSystem;

// At editor load, or from an initialization method
BindSystem.RerouteBoundFieldOf<Health>("_current", "Current");

// Or by type
BindSystem.RerouteBoundField(typeof(Health), "_current", "Current");

// Remove it
BindSystem.UnrouteBoundField(typeof(Health), "_current");
```

`overwrite: true` replaces an existing route for the same field rather than leaving it in place.
{% endtab %}

{% tab title="From the settings page" %}
**Project Settings ▸ Binding System ▸ Configuration ▸ Fields Rerouting** lists every route in the project, with the type, the source field and the target member, and lets you remove them.
{% endtab %}
{% endtabs %}

## What it looks like in the Inspector

A rerouted binding shows a **reroute icon** on its row. Hovering it says exactly what is happening:

> **BIND IS BEING REROUTED** **Field** `_current` → **Property** `Current`
>
> When setting or getting the value to this field, it will be rerouted to the property instead. For example this helps when a property has logic in its accessors which a field is lacking.

The bind menu also gains a **Reroute** entry under **Settings** for that binding, so the redirection is visible and reversible where you meet it.

<figure><img src="https://3048705056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLUfBXR02sJ5i0MxwYbaV%2Fuploads%2FsyREZrQWGaacS91FNlhH%2FScreenshot%202026-09-28%20at%2018.25.53.png?alt=media&amp;token=a13dd31a-685f-45ee-8b0f-6a12e349f03f" alt="" width="563"><figcaption><p>The reroute indicator on a bind row</p></figcaption></figure>

## Where routes are stored

In a `field-routes` asset inside the [Bindings folder](/binding-system-3/reference/settings.md#bindings-path). Project wide, under version control, shared with the team.

{% hint style="danger" %}
Do not delete that asset. It holds every field route in the project, and deleting it removes all of them.
{% endhint %}

## When to use it

<table><thead><tr><th width="330">Case</th><th>What to do</th></tr></thead><tbody><tr><td>A property wraps a serialized field with real logic</td><td>The main case. Route the field to the property.</td></tr><tr><td>A field is kept for serialization but the API moved on</td><td>Route it to the new member.</td></tr><tr><td>A third party component you cannot change</td><td>Route its field to a property that behaves correctly.</td></tr><tr><td>A single binding needs different behaviour</td><td>Wrong tool. Change that binding's path.</td></tr></tbody></table>

{% hint style="warning" %}
A route is global and invisible unless you look for the icon. That is the point, and it is also the risk: somebody reading the code will not see it. Set routes in one place, and prefer routing *toward* the member you consider the real API.
{% endhint %}

## Related pages

* [Proxy Bindings](/binding-system-3/overview/proxy-bindings.md): where rerouting matters most, because a proxy attaches to the serialized field.
* [Refactoring](/binding-system-3/project-tools/diagnostics/refactoring.md): repairing a rename, which is a different problem.
* [Settings](/binding-system-3/reference/settings.md#configuration): the routes manager.
