Unity and Pupil Capture Installation
The tutorials on this page shows you how to install Unity and Pupil Capture properly on Windows and Mac. The PDF-Version of these tutorials are available at our download section. Content:
Unity InstallationEstimated time for installation: 1 hour 30 minutes
UnityUnity is a 3D engine for multi-platform game development. It’s a tool to create 3D and 2D games with a focus on easy entry area for developers. We use Unity to build virtual reality and augmented reality applications.
- Download Unity version 5.5.1 and install it.
- In the next step create a new project. Click on the “NEW” button (Fig. 1.1.1) and fill in the details of the project (Fig. 1.1.2). The project name and its location are up to your personal preference.
- Import the provided unitypackage "PGBullsEye“ into the newly created project. To do this choose Assets -> Import Packages -> Custom Packages -> PGBullsEye (Fig. 1.1.3). This import might take up to several minutes.
Android SDKThe Android Software Development Kit (SDK) is required to build applications for Android smartphones. Unfortunatly you can’t download the Android SDK seperatly, it can be only downloaded along with the Integrated Development Environment (IDE) Android Studio.
- First download Android Studio, install and start it. Click on Configure -> SDK Manager to open the SDK Manager (see figure 1.2.1).
- Under Android SDK -> SDK Platforms select Android 7.0 Api 24 (Figure 1.2.2). This Android version is required to build the android application with Unity 5.5.1f.
- For SDK Tools select the three elements (Figure 1.2.3) and click on apply. The specified items are downloaded. This may take some time. Note the path of the AndroidSDKLocation.
- Open unity as described above. Go to File -> Build Settings select Android as a platform and click Switch Platform.
- Go to Unity -> Preference -> External Tools and enter the previously noted AndroidSDKLocation (Note that this is JDK8).
- Unzip the file "tools_r25.2.5" and overwrite the path from the old SDK version wirh the unzip file.
Figure 1.2.4: Tipping on the build number in the phone settings
Figure 1.2.5: Enable USB debugging in the developer options
Pupil Capture InstallationEstimated time for installation: 30 minutes Pupil Capture is an eye tracking software by Pupil Labs and is used by our framework. It’s open source and you can easily expand it with own plugins. This chapter describes all the steps for installing the PyUVC driver on Windows, which is neccessary to use a camera for Pupil Capture. Before the plugin can be initialized, please refer to this webpage to find the correct version which matches your OS. Preferably v0.9.12.
PyUVC driver installation for Pupil Capture
- Now you should see a list of all connected USB devices. Select your device, which is marked with the addition "composite parent". A possible selection is shown on the figure 2.1.2.
- Set the driver of your device on "libusbK (v18.104.22.168)" and press "replace driver"(Fig. 2.1.3)
- Start Pupil Capture and verify that the driver installation was successful by selecting the camera as the USB device. If this is not the case, please run the driver installation again.
Plug-In IntegrationOnce the Pupil Capture software and the drivers are installed, the last step will be integrating our plugin for video streaming. Just follow these few steps:
- If you haven’t done it yet, run Pupil Capture once. This should create a directory called "pupil_capture_settings" in your home directory e.g. /Users/ < username > (Windows), /Users/ < username > (Mac).
- Locate the directory called "plugins" in this folder and drop our python file "unity _streaming _plugin" here.
- After restarting Pupil Capture the software should load the plugin automatically, and an additional capture source for streaming video data from an Unity application should appear in the capture selection selector in the world window.