Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

INotifyValueChangedExtensions.RegisterValueChangedCallback

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static bool RegisterValueChangedCallback(INotifyValueChanged<T> control, EventCallback<ChangeEvent`1> callback);

Description

Registers this callback to receive ChangeEvent<T0> when the value is changed.


This calls CallbackEventHandler.RegisterCallback on the same control (equivalent to registering a ChangeEvent<T0> callback directly). ChangeEvent<T0> 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.