Table of Contents

Unity GestureWorks FAQ


Getting Started

Does GestureWorks Core require Unity Pro to run?

Yes, currently GestureWorks Core requires Unity Pro and is not supported on the free version of Unity.

What runtime platforms does GestureWorks Core Unity support?

Windows 7 and Windows 8. Future versions may provide support for iOS, Android, and other platforms, but they are not available at this time.

Where can I find the GestureWorksUnity asset package?

The GestureWorksUnity asset package is available on GitHub here.Please note that you will need to purchase the GestureWorks Core DLL separately and include it in your project as described in the tutorials.

Is the GestureWorksUnity asset package required to make GestureWorks Unity applications?

No, the package contains a set of helper classes and assets to make setting up and managing GestureWorks simpler inside of Unity, but none of it is required. We strongly recommend, however, using these classes and going through the tutorials if this is your first time using GestureWorks with Unity.

What are the basic steps for setting up a Unity GestureWorks project?

The best place to learn this is following our tutorials. But the basic process for configuring a project is as follows:

I don’t have GestureworksCore32.dll, just GestureworksCoreWin7.dll and GestureworksCoreWin8.dll, how can I configure my project?

Contact customer support to get the latest dlls for GestureWorks Core. In the meantime, in Assets/GestureWorks/Core/GestureWorksUnity.cs change the line:

  private string dllFileName = "GestureworksCore32.dll";

To the name of your dll for your platform.

Are touch events supported in the Unity Editor?

No, at least not by GestureWorks. Touch support is only available when building and running the game as a standalone application. But GestureWorks Unity does provide a mouse based touch simulator to simulate one and two point touches; more details are in this tutorial.

How does the touch simulator work in the Unity Editor?

The mouse touch simulator for use in the Unity Editor works by having left click and drag support one mouse point. Right click and drag supports two points, with dragging the mouse creating space between the touch points. To move two points hold the Alt key down when right dragging. More details on the simulator are in this tutorial.

How do I disable showing touch point data on screen?

Options for showing touch and mouse point data are on the GestureWorks Game Object in the Gesture Works Script component. Further details are in this tutorial.

I have a custom GML file, do I need to use the one provided in the GestureWorksUnity package?

No, the my_gestures.gml file provided in Assets/GestureWorks/Core is just a basic GML file, and can be replaced with a custom one. But the name and location of the file need to be the same, or the postbuild process needs to be adjusted (see Troubleshooting Failed to Copy File error below). If you are new to GestureWorks, however, we strongly recommend using the default gesture markup file.


Troubleshooting

I created a project, imported GestureWorksUnity package, but have errors finding GestureWorks:

  error CS0246: The type or namespace name `GestureWorks' could not be found. Are you missing a using directive or an assembly reference?

The core GestureWorks dlls are not part of the GestureWorksUnity package, and need to be copied separately to Assets/GestureWorks/Core. For details see this tutorial on configuring GestureWorks for Unity.

I created a project, imported GestureWorksUnity package, copied my GestureWorks Core dlls, but nothing happens when I run in the Editor or as a standalone.

An instance of the GestureWorks prefab needs to be added to the scene. Drag Assets \GestureWorks\Unity\Prefabs\GestureWorks.prefab into your project.

My GestureWorksUnity project is configured and runs in the Editor, but I have no touch events when running as a standalone application.

This would probably be an issue with GestureWorks initializing. When building your application enable development build, File→Build Settings→Development Build. GestureWorks Unity will log on screen any problems with initializing.

Touch events work fine when running my application fullscreen, but are incorrect when running in Windowed mode.

GestureWorks is currently setup to only handle fullscreen Unity applications. Windowed mode is not supported at this time.

I have Force Mouse Sim Enabled on my GestureWorks object but when I use touch and mouse together certain gestures act strangely.

Force Mouse Sim Enabled is there for applications to be run on non touch supported devices. Mixing input from the mouse and touch is not supported by GestureWorks and may cause incorrect results.

I have a GameObject with a component that inherits from TouchObject, but it is not responding to gestures.

All TouchObjects need to have an Unity Collider to respond to touch events. More details are in our tutorials. For additional debugging enable “Log Input” on the GestureWorks Game Object. This will log all touch and hit events.

When building I have a Failed to Copy File error similar to this:

  IOException: Failed to Copy File / Directory from 'C:\Project\Assets\Gestureworks\Core\my_gestures.gml' to 'C:\Project\test_Data\my_gestures.gml'. PostBuildProcessor.OnPostprocessBuild (BuildTarget target, System.String pathToBuiltProject) (at Assets/Editor/PostBuildProcessor.cs:53) UnityEditor.HostView:OnGUI()

The build process expects specific files and folders at specific locations to work correctly by default. They are:

  Assets/GestureWorks/Core/GestureWorksCore32.dll
  Assets/GestureWorks/Core/my_gestures.gml

These can be changed from default by adjusting the variables at the top of Assets/GestureWorks/Core/GestureWorksUnity.cs

Scale is behaving strangely in the Unity Editor and is not consistent across game runs.

Scaling has an issue running in the Unity Editor when it’s multiply filter factor is not one. Look in your gml file and change the factor inside the multiply filter section, as shown here:

linenums:1 | // //
<Gesture id="NScale" type="scale">      
...
    <multiply_filter>
        <property ref="scale_dsx" active="true" func="linear" factor="1.0"/>
        <property ref="scale_dsy" active="true" func="linear" factor="1.0"/>
    </multiply_filter>
...
</Gesture>

Calling Destroy() on a TouchObject is causing a crash.

Prior to destroying a TouchObject it must be deregistered with GestureWorks Unity to not cause issues with processing gestures. Do not call Destroy() directly but instead use GestureWorksScript’s DeregisterAndDestroyTouchObject method. More details are in this tutorial.

I am getting a crash when switching scene files in Unity.

Switching scenes with GestureWorks should not be done by calling Application.LoadLevel, instead calling GestureWorksScript SwitchScenes. More details are in this tutorial.