UI Toolkit Data Binding - Overview
This package adds data binding to UI Toolkit elements by providing a Link object that points at object data and a LinkedElement that knows to refresh with the linked data. No watchers are used so nothing is constantly checking variables to see if they've changed, you have complete control over what updates and when. However, if you want automatic refreshes immediately on data change there's a simple pattern to do that as well.
Features
Works with both in-game and custom editor UI.
Make your UI refresh manually via Link.Refresh() or automatic whenever your data changes.
No data watchers constantly checking for updates so there's no constant performance hit.
Refreshes only the visible UI, elements not visible in the DOM are refreshed automatically when made visible.
Bind UI to any object data anywhere, it can even bind to private properties.
Link objects are considered the same if they point to the same data; no need to carry Link references all over the place.
In-editor documentation with live examples and code snippets.
Manual refresh example - name label
C#
Automatic refresh example
C#
C#
Installation
Grab it from the Unity Asset Store.