RegisterValueChangedCallback<T>(INotifyValueChanged<T>, EventCallback<ChangeEvent<T>>)
Registers this callback to receive ChangeEvent<T> when the value is changed.
읽는 시간 1분최근 업데이트: 10일 전
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.