P
P
Pavel2018-05-27 13:46:45
C++ / C#
Pavel, 2018-05-27 13:46:45

How to force end an event in Unity?

The user drags an item across the screen.
I need to do a certain action when the user brings a finger with an object to the desired point.
After that, regardless of whether the user removed the finger or not, I need the item to return to its place.
But there is a problem here: the drag event is not completed until the finger leaves the screen.
Is it possible to get around this without extra bool variables?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2018-05-27
@youkerni

https://docs.unity3d.com/ScriptReference/EventSyst...
eventData has a Reset() method;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question