Learn / Documentation / Gesture Listener
Scripting

Description

In order to be able to react when a gesture happens, a microphone-like device, that interprets the touch info, is needed. This is where the Gesture Listener comes in play. It gets notified every time a touch happens and triggers any set number of actions.

Touchy uses the Touch Detector in order to capture any inputs that are touch related and sends the touch info to all the registered Gesture Listeners.

You can use as many Gesture Listeners and you want, as only the Touch Detector is responsible for capturing touch inputs and additional listeners will not impact performance in any way.
See Also: Touch Detector

Component Details

Gesture Listener
Gesture Listener
  • Manual – Link to the manual page for this component

  • YouTube – Link to the quick video tutorial for this component

  • Touchy Settings – Opens the Control Panel at the Touchy tab

  • Debug – Enables relevant debug messages to be printed to the console

  • Global Listener – If TRUE, it will trigger this listener regardless of the target GameObject

  • Target GameObject – Only gestures performed on the target game object will trigger this listener

  • Override – Allows you to set another target GameObject reference, other than the GameObject this component is attached to

  • Gesture Type – The gesture type that this listener will react to

  • Swipe Direction – The swipe direction that this listener will react to. This works only if the Gesture Type is set to GestureType.Swipe

  • OnGestureEvent – Callback executed when this listener is triggered

  • Game Events – Game events sent when this listener is triggered