User Tools

Site Tools


The Samples

FingerGestures ships with several samples demonstrating some of the main features of the library.


The samples are included in the “Samples.unitypackage” sub-package located under the Assets/Plugins/FingerGestures folder:

To add the samples to your project, simply double click the “Samples” package then click the “Import” button.

The samples and associated content will be extracted to your Assets/FingerGestures Samples folder.

Using the Samples Browser

The “Sample Browser” scene provides a convenient menu for loading the various sample scenes. However, due to some limitations with Unity's package system, the sample scenes are not automatically added to your project's build settings upon extraction. In order to use the sample browser, you must add them manually:

  1. Open your project's build settings via File > Build Settings.
  2. Locate the various scene files under the Assets/FingerGestures Samples folder as shown on the screenshot below
  3. Drag and drop all the scenes files you find to the Build Settings window's “Scenes in Build” list
  4. Ensure that the “Sample Browser” scene is the first item in the list
  5. Optionally, you can also set Default Screen Width to 600 and Default Screen Height to 400 in the Player Settings

You should now be able to navigate the various samples via the built-in menus from the editor, or even generate a build to try it on device or as a standalone application.

Samples List

The following sample scenes are included:

  • Finger Events
    • FingerEventsPart1: shows how to use the various FingerEventDetectors to detect finger down, up, stationary and hover events
    • FingerEventsPart2: helps you visualize the various finger motion events (FingerMotionDetector)
  • Gestures
    • BasicGestures: shows how to detect and react to tap, double tap, drag, long-press and swipe gestures
    • PinchAndTwist: shows how detect pinch and twist gestures
    • PointCloudGestures: demonstrates how to match the user's gestures against a collection of PointCloud templates
  • Toolbox
    • Camera (toolbox scripts that you can put on a camera)
      • Toolbox-DragView: shows how to use the TBDragView camera script
      • Toolbox-Orbit: shows how to use the TBOrbit camera script
      • Toolbox-Pan: shows how to use the TBPan camera script
      • Toolbox-PinchZoom: shows how to use the TBPinchZoom script to implement pinch-based camera zoom
    • Object-Based (toolbox scripts that you can put on scene objects)
      • Toolbox-Drag: shows how to use the TBDrag script to easily drag scene objects around
      • Toolbox-Hover: shows how to use the TBHoverChangeMaterial and TBHoverChangeScale to have objects react to the presence of the mouse/finger above them
      • Toolbox-PinchToScale: shows how to use the TBPinchToScale script to change an object's scale with a pinch gesture
      • Toolbox-TwistToRotate: shows how to use the TBTwistToRotate script to rotate an object with a twist gesture

Next: Setting Up Your Scene

manual/samples.txt · Last modified: 2013/03/12 06:25 by wravaine