hey guys,
I have a script that handles my level select menu and it requires swiping to move to different level pages (each page has 12 lv buttons). Ive used a tutorial from Rehope Games on youtube which worked fine at first but has broken now for some odd reason. My prints dont work either.
Here is the script
public void OnEndDrag(PointerEventData eventData)
{
Debug.Log("__Swipead");
if (Mathf.Abs(eventData.position.x - eventData.pressPosition.x) > dragThreshold)
{
Debug.Log("Swiped");
if(eventData.position.x > eventData.pressPosition.x)
{
Prev();
}
else
{
Next();
}
}
else
{
MovePage();
}
}
the dragthreshould is screen.width / 15