Unity’s UI parts specify event listeners in the Inspector that notify of state changes. The only listener that can be specified at this time is UnityEvent, which has only one parameter, and while Button parts can be specified separately, such as ID, Toggle and Slider parts use arguments as changed parameters, so a separate listener function must be prepared to identify the part.
While researching whether it was possible to change the listeners that can be specified in the Inspector to UnityEvent, we came across the idea of using UnityEvent.AddListner() from a script instead of the Inspector.
By using this, we were able to efficiently write UI-related event processing by notifying listeners along with the name of the part using Toggle, etc.