Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

Export your Unity Kinect Project for Windows Store

0.00/5 (No votes)
11 May 2016CPOL3 min read 8.6K  
How to export your Unity Kinect project for Windows store

Kinect officially supports Windows Store! So, if you decide to bring your Kinect apps & games to the Windows Store and reach more customers, be my guest.

Uploading traditional Windows Store apps, made with Visual Studio and XAML, is quite trivial. However, exporting a Kinect for Unity project as a Windows Store package is a little more complicated. In today’s tutorial, I’ll show you how to do it.

Prerequisites

Process

So, let’s see how we can export our Unity project as a Windows Store app. The screenshots below are found in the built-in demos of Vitruvius.

Step 0 – Create and Test Your Kinect Project

Create your Unity Kinect project as you’d normally do. Include the required references and test your game using the Unity Editor.

Kinect Unity Windows Store 1

Step 1 – Set Unity Build Settings

Then, navigate to File → Build Settings and add the scenes you want to include in the Windows Store project. Select Windows Store as your Platform. Select 8.1 as the target SDK. Then, click Build. Do not click “Build And Run”.

Attention: You cannot export for Windows Universal Apps (UWP) yet. Your Windows Store app would run in Windows 8.1 and Windows 10 with no problems, though.

Kinect Unity Windows Store 2

Step 2 – Export for Windows Store 8.1

Unity will then ask you to create or select a folder. This folder would include the Visual Studio Solution (.sln) files and binaries. Click Select Folder and wait. Unity will compile your project using the corresponding Windows Store APIs. Kinect SDK is fully compatible with Windows Store. However, your whole project and dependencies should be compatible with the Windows Store APIs. Avoid using iOS-specific, Android-specific, or Desktop-specific dependencies.

Kinect Unity Windows Store 3

Step 3 – Set Visual Studio Build Settings

After the process is completed, Unity will generate a Solution (.sln) file. Double-click to open it using Visual Studio.

Kinect is not compatible with ARM processors, so you’ll need to select x86 as your target processor. For better performance, you should also select Release instead of Debug.

Kinect Unity Windows Store 4

Step 4 – Add the Required References

And now the tricky part! Even though we have already included the Windows.Kinect namespace into our Unity project, one additional step is required. Visual Studio needs to map the Unity-specific classes and methods to the WinRT-specific ones. So, right-click the References option and select Add Reference.

Navigate to Windows 8.1 → Extensions and select WindowsPreview.Kinect (required) and Microsoft.Kinect.Face (optional). Click OK and wait for a few seconds.

Kinect Unity Windows Store 5

Step 5 – Run!

This is it! Hit the green Run button to launch your Kinect Windows Store app! Feel free to upload it to the Windows Store.

Kinetisense and XRsense are two Kinect Windows Store apps that use Unity. Give them a try!

The post Export your Unity Kinect project for Windows Store appeared first on Vangos Pterneas.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)