Minimal UI
Last updated
Last updated
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.
Here is the detailed anatomy view of a Bound Field drawer:
where:
Bind Toggle: whether the field/property is bound or uses direct value.
Bind Mode: this is the direction this bind is working. Can be read-only, write-only or both read and write. When holding CTRL (or CMD in MacOS) and clicking, it will toggle Live Debug
Field Toggles: these toggles hide or show secondary fields.
Bind Path: the path to bind. Uses a different format than the raw path. When holding CTRL (or CMD in MacOS) and clicking, it will open the drawer in a popup window, useful when there is not enough space in inspector.
Type: the type of the field/property to bind.
Bind Menu: reveals the menu specific to the field/property. Here new modifiers can be added and other options, such as Live Debug, can be enabled.
Source: the object source to get the values from.
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.
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. If a modifier doesn't show its modify mode button, then this modifier does not allow to change its mode.
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.
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.
Quick shortcuts, hold Ctrl (or Cmd on MacOS) and click:
For BindMode, it will trigger on and off the LiveDebug.
For Source Field, it will ping the object.
For Bind Path, it will open the bind field drawer in a popup window.
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 [OneLineModifier]
attribute over class definition to let it render as in the examples below.
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.
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: - SMART: will replace only bind fields which have paths compatible with dragged object. - FORCED: will replace all bind fields regardless of path compatibility.