A Note to Myself : Unity + Kinect + OSX

Dear NeoEddie,

If you are reading this, you’ve foolishly decided to get a new Mac, and need to set up Kinect to work with Unity (AGAIN). I’ve spent several hours scouring broken english forum posts, and don’t ever want to do it again. So, here’s how I got it going:
KinectSampleViewer

1) Make sure XCode is updated, and doublecheck the command line tools are installed (I think they are by default from v 5.0)

2) Install Macports

3) run

[code language=”bash”]

sudo port install libtool

sudo port install libusb +universal

[/code]

4) Restart

5) From the OpenNI site, download OpenNI v1.5.7.8 and NiTE v1.5.2.23 for OSX

6) Download SensorKinect

7) Make a folder somewhere to keep things organised (eg: ~/KinectSDK)

8) Extract OpenNI and copy to the Kinect folder

9) Install OpenNI:

[code language=”bash”]
cd /my/kinect/folder
cd OpenNI-Bin-Dev-MacOSX-v1.5.7.8
sudo ./install.sh
[/code]

10) Extract SensorKinect, go into /Bin, and extract the OSX package. Copy to the Kinect folder

11) Install SensorKinect:

[code language=”bash”]
cd ../Sensor-Bin-MacOSX-v5.1.2.1
sudo ./install.sh
[/code]

12) Extract NiTE, and copy to the Kinect folder

13) Install NiTE:

[code language=”bash”]
cd ../NITE-Bin-Dev-MacOSX-v1.5.2.21
sudo ./install.sh
[/code]

14) Drivers installed! Plug the kinect in, and test:

[code language=”bash”]
cd Samples/Bin/x64-Release
./Sample-PointViewer
[/code]

(Hopefully, the Kinect image should appear after a while, if you wave your hand it should start tracking)

15) Download the Unity-OpenNI bindings from Zigfu

16) Open a unity project, and import the bindings package…

17) DONE! Harvest code from the bindings examples and get Kinect running in your project.

Note: Thanks to OpenNI and avin2 for their libraries, and to these two posts for some much needed help

Regards,
Eddie

KinectUnityExample