User Tools

Site Tools


unity_hello_world_1

Getting Started (Hello World)

Introduction

In this tutorial you will prepare your development environment for using the Unity bindings for GestureWorks 2. The steps performed in this tutorial will prepare your environment for subsequent GestureWorks 2 Unity tutorials. For this tutorial you will need the Gestureworks 2 multitouch framework; a free trials available.

Requirements

  • Estimated time to complete: 15 minutes
  • A number of software packages are required for completing this:
  • GestureWorks 2 license
  • Microsoft Windows 7, 8, or 10
  • Unity 5 or greater
  • Multitouch display device

Process Overview

  1. Download and install software prerequisites
  2. Create a new project in Unity
  3. Add GestureWorks to the Project
  4. Add GestureWorks to the Scene
  5. Update the build

1. Download and install software prerequisites

  • Download and install Unity
  • Retrieve GestureWorks 2 Package
    • Find your GestureWorks 2 installation (by default at C:\Program Files(x86)\Ideum\GestureWorks2). You will need the Unity package located at Core\Unity3D Bindings\GestureWorksUnity.unitypackage.

2. Create a new project in Unity

To get started, open Unity and create a new project in the File > New Project menu
We will call our project in the next lesson Hello Multitouch, so please enter that name in a location that is most convenient. There are no extra package imports to check in the project creation wizard so after naming the project, press Create.

3. Add Gestureworks to the Project

Import the GestureWorks Unity asset package found in step 1. Goto Assets→Import Package→Custom Package…

And select the GestureWorksUnity Unity package file and Open.

The import dialog will app

Import all files in the package.

4. Add GestureWorks to the scene

The GestureWorks Unity package contains prefabs for running GestureWorks in a 3D scene and for fullscreen mode. To create a GestureWorks instance to handle our scene drag from Assets/GestureWorks/GestureWorksScene.prefab to the Hierarchy of the scene:

To see GestureWorks is running correctly check to enable Show Touch Point:

Here is a description of the various options:
Block on UI - Touch for gestures in the scene are blocked by any Unity canvas UI.

  • Log Initialization Details - Log detailed info on GestureWorks initialization. Helpful for debugging initialization issues and is typically kept true.
  • Log Input Enabled - Log all input and gesture events. This creates a large log and is typically false and enabled only for debugging specific issues.
  • Show Touch Points - Show dots at touch points visualizing them.

Then save your scene to whatever you like.

If you run the project in editor you will see touch points in the game preview panel.

5. Update the build

Next set your build settings by going to File > Build settings. Since GestureWorks Unity contains a 64 bit dll specify the build as Windows x86_64. Also add your scene. Your build settings should look like the ones below.

You can now build and run the project as a standalone executable. You will see touch points in the scene:

unity_hello_world_1.txt · Last modified: 2019/01/21 16:34 (external edit)