Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ScrollRect.OnDrag

Switch to Manual
public function OnDrag(eventData: EventSystems.PointerEventData): void;

Parameters

Description

Handling for when the content is dragged.

#pragma strict
// Required when using event data
//Do this while the user is dragging this UI Element.
public function OnDrag(data) {
	Debug.Log("Currently dragging " + this.name);
}