RegisterValueChangedCallback<T>(INotifyValueChanged<T>, EventCallback<ChangeEvent<T>>)
Registers this callback to receive ChangeEvent<T> when the value is changed.
読み終わるまでの所要時間 1 分最終更新 13日前
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public static bool RegisterValueChangedCallback<T>(this INotifyValueChanged<T> control, EventCallback<ChangeEvent<T>> callback)
Parameters
Returns
Type | Description |
|---|---|
| bool |
Remarks
This calls CallbackEventHandler.RegisterCallback on the same control (equivalent to registering a ChangeEvent<T> callback directly). ChangeEvent<T> participates in propagation; handlers on an ancestor receive bubbled events from descendant controls of the same event type.
Use EventBase.target to identify which element originated the change, and EventBase.currentTarget for the element on which the callback was registered. Refer to the Change events manual page for guidance on filtering and composite controls.