This shows you the differences between two versions of the page.
| — |
unity_hello_world_1 [2019/01/21 16:34] (current) |
||
|---|---|---|---|
| Line 1: | Line 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 ===== | ||
| + | |||
| + | - Download and install software prerequisites | ||
| + | - Create a new project in Unity | ||
| + | - Add GestureWorks to the Project | ||
| + | - Add GestureWorks to the Scene | ||
| + | - Update the build | ||
| + | |||
| + | ==== 1. Download and install software prerequisites ==== | ||
| + | * Download and install [[https://unity3d.com/ | 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. | ||
| + | |||
| + | {{:createprojectprompt.png?600|}} | ||
| + | |||
| + | |||
| + | ==== 3. Add Gestureworks to the Project ==== | ||
| + | Import the GestureWorks Unity asset package found in step 1. Goto Assets→Import Package→Custom Package… | ||
| + | |||
| + | {{:import_package.png?600|}} | ||
| + | |||
| + | And select the GestureWorksUnity Unity package file and Open. | ||
| + | |||
| + | {{:importdialog.png?600|}} | ||
| + | |||
| + | The import dialog will app | ||
| + | |||
| + | {{:importpackage.png?600|}} | ||
| + | |||
| + | 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: | ||
| + | |||
| + | {{::gestureworkshierarchy.png?600|}} | ||
| + | |||
| + | To see GestureWorks is running correctly check to enable Show Touch Point: | ||
| + | |||
| + | {{::gestureworkssceneshowtouchpoints.png?600|}} | ||
| + | |||
| + | 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. | ||
| + | |||
| + | {{::image6.png?600|}} | ||
| + | |||
| + | ==== 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. | ||
| + | |||
| + | {{:buildsettings.png?600|}} | ||
| + | |||
| + | You can now build and run the project as a standalone executable. You will see touch points in the scene: | ||
| + | |||
| + | {{::touchpoints.png?600|}} | ||