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.
CloseFor 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.
CloseCallback executed when the position of the child changes.
onValueChanged is used to watch for changes in the ScrollRect object.
The onValueChanged call will use the UnityEvent.AddListener API to watch for
changes. When changes happen script code provided by the user will be called.
The UnityEvent.AddListener API for ScrollRect.onValueChanged takes a Vector2.
Note: The editor allows the onValueChanged value to be set up manually. For example the
value can be set to run only a runtime. The object and script function to call are also
provided here.
The onValueChanged variable can be alternatively set-up at runtime. The script example below
shows how this can be done. The script is attached to the ScrollRect object.
no example available in C#