A downloadable code asset

Download NowName your own price

About

Why did I create this thing?

In general, initially the swipe recognition system was not conceived as a separate asset. I needed it for the implementation of a project that never saw the light. But after a few months, I thought about it and decided that such an asset can be useful to many, especially beginners. All interaction with it is based on events and this ensures convenient use in any project. ((Examples of use can be found in the documentation.)


Package types

  • GoTo-Apps.SwipeDetector v.1.1 [ALPHA] (Education):
    The most complete version. With documentation and usage examples. Ideal for the first acquaintance with the package.
  • GoTo-Apps.SwipeDetector v.1.1 [ALPHA] (Production):
    The version of the package without usage examples.

Documentation

Description of components, events, methods, and properties that are present in the asset.

Settings

  • Swipe Detection Mode (DetectionMode) - Swipe detection mode. Completed swipe or uncompleted swipe.
  • Min Swipe Distance (float) - Minimum swipe length. If the swipe length is less than the specified one, the swipe will not be recognized.
  • Is Paused (bool) - Pause. If the value is `true`, the component does not process swipes and does not raise events.

Events

  • Swipe Start (UnityEvent<Vector2>) - An event that is triggered when the user touches the screen. The touch position is passed as a parameter.
  • Swipe End (UnityEvent<Vector2>) - An event that is triggered when the user releases the screen. The position at which the user released his finger is passed as a parameter.
  • Swipe Up (UnityEvent) - An event that is triggered when a player makes an up swipe.
  • Swipe Right (UnityEvent) - The event that is triggered when the player makes a swipe to the right.
  • Swipe Down (UnityEvent) - The event that is triggered when the player makes a swipe down.
  • Swipe Left (UnityEvent) - The event that is triggered when the player makes a swipe to the left.

Methods

  • SwipeInput.SetPause()  - Sets the pause.
  • SwipeInput.UnsetPause() - Removes the pause.

Examples

3 steps to easy use.

1) - Create event handler.

First, you need to decide what you want to do with swipes. You need to create a swipe event handler.


2) - Add a handler to the event.

Then you need to select the appropriate event and add a handler to it. For example, I want my handler to run when swiping to the left.


3) - Enjoy the result.

That's it, let's go make coffee and rejoice at how cool we are :)



Support

You can help me make the world a better place.

You can use my products absolutely free of charge for any purpose, including commercial. But if my product makes your work easier, then you can thank me by paying the amount that you consider necessary for this asset. Or you can subscribe to me on Patreon using the button below.:)

Become a patron button.

Burning-Lab
StatusReleased
CategoryAssets
Publisher
Release date Jul 23, 2021
Authorn.fridman
Made withUnity
Tagsasset, code, swipe, Unity
Code licenseMIT License
Asset licenseCreative Commons Attribution v4.0 International
Average sessionA few seconds
LanguagesEnglish
InputsTouchscreen, Smartphone
AccessibilityConfigurable controls
LinksSource code, Patreon, YouTube

Download

Download NowName your own price

Click download now to get access to the following files:

Burning-Lab.SwipeDetector 1.0.3 (Education).unitypackage 556 kB
Burning-Lab.SwipeDetector 1.0.3 (Production).unitypackage 418 kB
Burning-Lab.SwipeDetector 1.0.1 (Education).unitypackage 218 kB
Burning-Lab.SwipeDetector 1.0.1 (Production).unitypackage 82 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.