# Minimal UI

Binding System UI (Minimal UI) is a set of modern drawers for bind fields built on UI Toolkit. It is simple,  compact and customizable. The thinking behind Minimal UI is to try to have as much bind field control and information as possible in a single line of Unity Inspector.  It also has some  additional features, such as Group rebinding and more.

<figure><img src="/files/iUsAPVw58DtPWZtTaQ0C" alt="" width="375"><figcaption><p>Minimal UI</p></figcaption></figure>

Here is the detailed anatomy view of a <mark style="color:orange;">**Bound Field**</mark> drawer:

<figure><img src="/files/GtawDe046LRsuaA0PbaT" alt=""><figcaption><p>Bind Inspector View</p></figcaption></figure>

where:

1. **Bind Toggle**: whether the field/property is bound or uses direct value.
2. **Bind Mode**: this is the direction this bind is working. Can be read-only, write-only or both read and write. When holding <mark style="color:blue;">CTRL (or CMD in MacOS)</mark> and clicking, it will toggle <mark style="color:orange;">**Live Debug**</mark>
3. **Field Toggles**: these toggles hide or show secondary fields.
4. **Bind Path**: the path to bind. Uses a different format than the raw path. When holding <mark style="color:blue;">CTRL (or CMD in MacOS)</mark> and clicking, it will open the drawer in a popup window, useful when there is not enough space in inspector.
5. **Type**: the type of the field/property to bind.
6. **Bind Menu**: reveals the menu specific to the field/property. Here new modifiers can be added and other options, such as <mark style="color:orange;">**Live Debug**</mark>, can be enabled.
7. **Source**: the object source to get the values from.
8. **Converter**: when a converter is used, the line will appear. If the icon is gray, this means the conversion is safe, otherwise if orange, the conversion may fail, because the types are not fully compatible.
9. **Modifiers**: the list of modifiers. *Note*: the order is very important. Each modifier can be dragged to change their order.
   * A. **Modifier Mode**: when this modifier is used, during read operation, during write or during both. <mark style="color:blue;">If a modifier doesn't show its modify mode button, then this modifier does not allow to change its mode.</mark>
   * B. **Delete**: removes the modifier from the list.

Here are some of its features:

* Drag and drop objects to change source and/or path:\
  No need to expand the Source Field to change the source, just drag the object over the path field and the path popup will show up automatically, or if the new object is compatible with current path, it will only replace it.<br>

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/a/1/f/a1fdb5c7718d529d31eea4fac828a206cdf3078f.gif" alt="" width="375"><figcaption><p>Drag And Drop on Empty Path</p></figcaption></figure>

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/0/b/b/0bb6055b6b7b4860b2908d9b0caf6a21eb542fba.gif" alt="" width="375"><figcaption><p>Drag and Drop and Cancel</p></figcaption></figure>

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/c/f/8/cf82b46e1049728d35179f2cf191d8b5a677b44e.gif" alt="" width="375"><figcaption><p>Drag and Drop on compatible path</p></figcaption></figure>

* Collapse or expand additional fields:\
  Converters, Modifiers and Source Field are not essential all the time, they can be collapsed. The "is expanded" information is serialized and will persist with the bind field.

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/c/f/7/cf7277a4e69b1eb9983d75eae82596068ca53f0f.gif" alt=""><figcaption><p>Hide secondary fields</p></figcaption></figure>

* Quick shortcuts, hold Ctrl (or Cmd on MacOS) and click:
  * For BindMode, it will trigger on and off the <mark style="color:orange;">LiveDebug</mark>.
  * For Source Field, it will ping the object.
  * For Bind Path, it will open the bind field drawer in a popup window.

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/4/4/6/4465a5dbd8247a2a63e596ce33ab61c135978979.gif" alt="" width="563"><figcaption><p>Shortcuts</p></figcaption></figure>

* Compact Modifiers:\
  Some modifiers have only one field, and it is space consuming to have the foldout only for one field. The field may be rendered directly instead of foldout. Add <mark style="color:orange;">`[OneLineModifier]`</mark> attribute over class definition to let it render as in the examples below.

<figure><img src="https://europe1.discourse-cdn.com/unity/optimized/4X/f/a/2/fa2083cbcc012d59bcca600870a51b68225601d7_2_517x184.png" alt="" width="375"><figcaption><p>Compact Modifiers</p></figcaption></figure>

* Advanced Tooltips:\
  The tooltips have been greatly improved to contain dynamic data, such as when LiveDebug is active and the errors present in the fields. The use of different colors further enhance some aspects for tooltips.

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/6/3/7/637ebe86c67e764a64920431d27ea0967db9c8d3.gif" alt="" width="375"><figcaption><p>Better Tooltips</p></figcaption></figure>

* Bind groups of fields. Groups are formed either by headers or by foldouts, such as complex types or arrays.\
  Currently there are 2 ways of rebinding groups of bind fields:\
  \- <mark style="color:blue;">SMART</mark>: will replace only bind fields which have paths compatible with dragged object.\
  \- <mark style="color:orange;">FORCED</mark>: will replace all bind fields regardless of path compatibility.

<figure><img src="https://europe1.discourse-cdn.com/unity/original/4X/5/b/9/5b94aae3978bb0c5fc3deb8e11aabc8a728466fb.gif" alt="" width="375"><figcaption><p>Group Rebinding</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://postica.gitbook.io/binding-system-2/product/minimal-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
