Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

ScrollRect.OnBeginDrag

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

Parameters

Description

Handling for when the content is beging being dragged.

#pragma strict
// Required when using event data
//Do this when the user starts dragging the element this script is attached to..
public function OnBeginDrag(data) {
	Debug.Log("They started dragging " + this.name);
}