# Welcome

<div data-full-width="true"><figure><img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FuxlzHb9PdMHptcbtRQr5%2FBindingSystem_ShortBanner.png?alt=media&#x26;token=c4649327-58b3-44fb-be79-44b8f368e2db" alt=""><figcaption></figcaption></figure></div>

## Overview

The BindingSystem is a robust Unity plugin that brings generalized value binding within projects. This comprehensive guide will walk you through the plugin's features, from the core Bind class to extending its functionality with converters, modifiers, and more.&#x20;

**High-Level Features**:

1. **Quick Data Binding:** Instantly connect serialized values to any Unity property, even non serialized ones, directly in Unity Editor without any code manipulation.
2. **Opt-in Design:** Once changed to bindable value, you decide whether to bind the value or just use it's pure value, without having to change your code.
3. **Intuitive Setup:** The user interface is as user-friendly and non-intrusive as it gets with a searchable dropdown menu for efficient binding configuration.
4. **Real-Time Debugging:** Identify and resolve issues with Live Debug and error visualizations, gaining valuable insights into data flow during runtime.
5. **Custom Extensibility:** The system can be easily extended with new converters, modifiers, and value providers, thus adding new capabilities to the system.
6. **Optimized Performance:** The whole system architecture was built to provide high-performance operations, optimized reflection, and methods generation with virtually no overhead.

## Why BindingSystem?

The main ideology for BindingSystem is loosely based on Dependency Injection paradigm with some major differences.&#x20;

There are some prominent use-cases where you can use Binding System:

### Code Modularization

You can define a physics door for example, which acts as a door but reponds to physics events as well. This door has some parameters, both for setup and for controlling the door. In typical coding fashion, to control the door, you need to add it into another _**controller component**_ and pass it somehow to this controller. \
This creates a direct dependency:&#x20;

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FPtCMWkod7SMgBmODxJKo%2Ffile.excalidraw.svg?alt=media&#x26;token=c7179dd1-d02f-428d-a339-c82463812da0" alt="" class="gitbook-drawing">

Now whenever the logic in the door needs a small change, the risk is both files need to be touched.\
-> With BindingSystem, the door can have all its parameters as bindable, and the values for this parameters can come from many different sources. This removes the need to have a _**controller component**_ and makes the door self-contained and independent from other code. As a bonus, this also make the door easily testable in isolation, since at runtime you can play with parameters (both manually and automatically) to adjust its behaviour, and once finished, apply the correct bindings in correct places.

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2F4CssFbn6gVuFMiAWA4Ba%2Ffile.excalidraw.svg?alt=media&#x26;token=52afe36f-492f-46ef-a68a-42f9cf0e72e0" alt="" class="gitbook-drawing">

In the example above, also Lever, Slider and UI Buttons may be self-contained and provide some output parameters, effectevely making them independent and unaware where they will be used, be it for opening a door, or lowering a health bar.

### Data Forwarding

Sometimes there is a need to forward some data from component A to component B. To do so, you either change A and add B as its output, change B and add A as its input or create a third one which acts as a bridge between them. It seems easy at first, but what happens if you need to send from A to C, D, E, F, and more?

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2F6eHtIs1z1gIeS8LLEnbz%2Ffile.excalidraw.svg?alt=media&#x26;token=b5433172-9fc2-4f9f-a921-ec12909ad8e7" alt="" class="gitbook-drawing">

\
With Binding System, this can be avoided without altering any of the components. The important part is that A must have its output parameters as bindable. Next is just binding this parameter to an input value (be it field, property or method) of B. This way, every time there is a change in A's output parameter value, B will receive the update immediately.

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2F0N5iSQVwCOuAFYW3p04U%2Ffile.excalidraw.svg?alt=media&#x26;token=40a41b57-16eb-4f14-a9c4-41cb1aee27b7" alt="" class="gitbook-drawing">

### Hybrid Data Collections

With BindingSystem, you can have a list of objects having the same type but with data coming from different sources.

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2Fk1nX9LQh8V85TOR9PVCy%2Ffile.excalidraw.svg?alt=media&#x26;token=47fb5009-6f4e-4a44-8ffd-287b43bfd56f" alt="" class="gitbook-drawing">

### Multi-Controlled Values

Sometimes there is a need to change a value using multiple controls. For example, changing a player max speed with an UI slider, input field and physical joystick. To achieve this, a special system needs to be created to handle the input and adjustments from all this sources and apply the final correct value to max speed variable.

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FAwarzCZADOntXR0dHFD7%2Ffile.excalidraw.svg?alt=media&#x26;token=55c0adaf-3a3e-4901-9195-03f76519011c" alt="" class="gitbook-drawing">

With BindingSystem, it is enough to use a multi-bind modifier and bind all these input sources together at the max value input parameter. The rest is automatically handled by the system.

<img src="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FlCoLIT62DfK58EjCNXs5%2Ffile.excalidraw.svg?alt=media&#x26;token=40b36512-59c7-4ddf-9b72-29948613bc02" alt="" class="gitbook-drawing">

Since the system is quite generic, there are many more applications of such a system, especially in a dynamic environment.

## Get Started

We've put together some helpful guides of some core features for you to get setup with our product quickly and easily.

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td align="center"><strong>Minimal UI</strong></td><td>Minimal UI</td><td></td><td><a href="product/minimal-ui">minimal-ui</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FUhjRrW9K5phSayVX6Nob%2FMinimalUI.png?alt=media&#x26;token=9cc41e83-6a9f-4e02-99cf-6f2430058ba6">MinimalUI.png</a></td></tr><tr><td align="center"><strong>Bind Class</strong> </td><td></td><td></td><td><a href="product/bind-class">bind-class</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FlXoNdttIfwNshEm8d2sc%2FBS_Bind_Pipeline_Dark.png?alt=media&#x26;token=a5f4268f-2923-45d2-bea7-cf04a306e15c">BS_Bind_Pipeline_Dark.png</a></td></tr><tr><td align="center"><strong>Binding Values</strong></td><td></td><td></td><td><a href="product/binding-values">binding-values</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FrOkXbcWyUCFJnQdkXr5t%2FMinimalUI_MyMonoBehaviour.png?alt=media&#x26;token=483ddee2-f8fc-4242-877d-f36a9fd07b6b">MinimalUI_MyMonoBehaviour.png</a></td></tr><tr><td align="center"><strong>Converters</strong></td><td></td><td></td><td><a href="product/extending-the-system/converters">converters</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FtjDW6qnZfcSHeW4xo9aM%2FConverter_MinimalUI_Simple.png?alt=media&#x26;token=28c418e6-3b72-4d45-81c4-4764a363cf7f">Converter_MinimalUI_Simple.png</a></td></tr><tr><td align="center"><strong>Modifiers</strong></td><td></td><td></td><td><a href="product/extending-the-system/modifiers">modifiers</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FEFO02uJBt9NxuVestpjk%2FBS_Modifiers_Interfaces.png?alt=media&#x26;token=7e24209c-3a07-46b2-b6a8-fed5254fa2af">BS_Modifiers_Interfaces.png</a></td></tr><tr><td align="center"><strong>Settings</strong></td><td></td><td></td><td><a href="product/settings">settings</a></td><td></td><td><a href="https://2360058278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3rw9jjjjlPycieM3U3MU%2Fuploads%2FKvLwMbz2xp2P0Bbsu5I1%2FSettings_2022.png?alt=media&#x26;token=e1a52c5c-c9a0-4595-87fc-095f53176a25">Settings_2022.png</a></td></tr></tbody></table>

{% content-ref url="product/extending-the-system" %}
[extending-the-system](product/extending-the-system)
{% endcontent-ref %}
