UI Toolkit Linker and Binder 3.0.1 links runtime UI Toolkit elements to MonoBehaviour components and can copy values from component fields or properties into supported controls.

Version 3 uses the DA_Assets.ULB namespace. Projects upgraded from an older UEL package must update C# using directives, assembly references, and UXML namespace or type names.

What the asset provides

  • Four locator modes: Name, IndexNames, Guid, and Guids.
  • Typed linker components that expose the linked VisualElement through Element and E.
  • One-way polling data binding for supported UI Toolkit controls.
  • VisualElement query extensions that use the same path and GUID search logic without a linker component.

Basic workflow

  1. Create a UIDocument and assign its UXML asset and PanelSettings.
  2. Add a linker component that matches the target UI Toolkit element type, for example UitkButton.
  3. Assign the UIDocument to the linker.
  4. Choose a linking mode and configure its locator.
  5. Call LinkElement when needed, then use Element or E to access the typed element.
  6. For a binder-capable linker, enable binding and select a source field or property.
csharp
using System.Collections;
using DA_Assets.ULB;
using UnityEngine;
using UnityEngine.UIElements;

public sealed class ToolbarView : MonoBehaviour
{
    [SerializeField] private UitkButton saveButton;

    private IEnumerator Start()
    {
        yield return null;
        Button button = saveButton.Element;
        button.clicked += OnSave;
    }

    private void OnSave()
    {
        Debug.Log(saveButton.Element.name);
    }
}

Linker components also call LinkElement automatically from Start. Call it again after replacing the UIDocument visual tree or changing the locator at runtime.

Version 3.0.1 API names

  • Namespace and runtime assembly: DA_Assets.ULB.
  • Base component: UitkLinkerBase.
  • Typed linker: UitkLinker<TElement>.
  • Typed linker with binding: UitkLinker<TElement, TBinding>.
  • Binding types: MemberBinding and UitkBindingSettings.
  • Direct lookup API: UitkQueryExtensions.

Compatibility

Concrete linker classes compile only when the corresponding UI Toolkit element type exists in the current Unity version. If a target type is unavailable, use another supported linker or query the UIDocument root directly.

The asset is distributed under the MIT license.