Structure Sensor Unity 3D

Hi All,

I am working on a C++ dll for Unity 3D that will use the structure sensor to scan a room to get depth information only. Currently I am attempting to mimic the code from the Multiple Stream Reader exe in the samples folder of Openni. Right now Unity creates an array to hold the depth information, imports the dll and enters at “StartSensor” (passing a reference to the depth array). StartSensor in C++ performs all the sensor initialization and starts a new thread to continually scan the room and save the depth information in the depth array (C++ and C# are sharing memory). Even at this step I don’t think it is working because I don’t see the red light on the sensor turn on even though nothing in the initialization is throwing an error… Am I going about this problem the correct way? Should I be making use of dll main and doing my initialization in there?

I can provide code if that helps.

Any help is greatly appreciated, Thanks!