Every Kinect sensor can be uniquely identified by an instance id. You can track and initialize each device connected based on that instance id when multiple devices are connected to the system. This instance id can be either the DeviceConnectionId or UniqueKinectId.
If you know the DeviceConnectionId for the particular Kinect sensor [ KinectSensor.DeviceConnectionId returns this id], you can use the same for instantiating the senor instead of using index . This will make sure that you are initializing the correct device if there are multiple numbers of devices. In code snippet below we have used the previously received unique instance id
KinectSensor sensor = KinectSensor.KinectSensors [@" USUSB\VID_0409&PID_005A\6&35F09B95&0&3"]; sensor.Start()
The DeviceConnectionId is the connection id returns the USB hub device instance path id, it may change once you plugged in the device in different USB controller Hub.
You can check by following – Open “Control Panel” and navigate to “Device Manager”. Then change the view of device manager to “Device by Connection”. Select the “Generic USB Hub” for the “Kinect for Windows Device” node and open properties. There you will find the same id which was specified in the above code.
KinectSensor object has another property named UniqueKinectId that returns a Unique Id for the Kinect sensor. You can use this Id to identify sensor uniquely.