I have a hidden slider object. When you press and hold on an image the slider appears righter above the image, when you let go the slider disappears.
I want to trigger the drage event of the slider handle automatically so you can move the slider while holding down on the image. I’ve tried a lot with Execute Events but the only thing that had any effect was ExecuteEvents.Execute(slider, e, ExecuteEvents.pointerDownHandler); which only selected the slider knob but didn’t move it.
I tried various combinations of ExectureEvents.beginDragHandler/initializePotentialDrag/dragHandler/movHandler but to no avail and I’m just guessing anyway so I hope you can help.
public void OnDrag()
{
slider.SetActive(true);
e = new PointerEventData(EventSystem.current);
ExecuteEvents.Execute(slider, e, ExecuteEvents.initializePotentialDrag);
ExecuteEvents.Execute(slider, e, ExecuteEvents.beginDragHandler);
}