Class UIToolkitButtonBinder
This class binds a Unity Action to a button within a Unity UI Toolkit document. It listens for button clicks and triggers the provided action when the button is clicked.
[RequireComponent(typeof(UIDocument))]
public class UIToolkitButtonBinder : MonoBehaviour
Inheritance
Remarks
It retrieves the button from the UIDocument by name, and registers a callback that calls the assigned UnityAction when the button is clicked.