Great! Thank you. I have it working now in both Unity and C. The tricks which did it:
Unity:
I only downloaded the MulticoreDevice Service (LeapDeveloperKit_4.0.0+522238_win) because that is where the blog pointed to. The whole UnityModules GitHub archive (one folder level up) includes the MultiDevice code. Look for the Multi Device (Desktop) scene found in Assets/LeapMotion/Core/Examples.
C:
For multi device tracking, You need to open the connection with eLeapConnectionConfig_MultiDeviceAware:
ConnectionCallbacks.on_connection = &OnConnect;
ConnectionCallbacks.on_device_found = &OnDevice;
ConnectionCallbacks.on_frame = &OnFrame;
//
LEAP_CONNECTION_CONFIG connectionConfig = LEAP_CONNECTION_CONFIG();
connectionConfig.server_namespace = NULL;
connectionConfig.flags = eLeapConnectionConfig_MultiDeviceAware;
connectionConfig.size = sizeof(connectionConfig);
connectionHandle = OpenConnectionWithConfig(&connectionConfig);
{
LEAP_ALLOCATOR allocator = { allocate, deallocate, NULL };
LeapSetAllocator(*connectionHandle, &allocator);
}
LeapSetPolicyFlags(*connectionHandle, eLeapPolicyFlag_Images | eLeapPolicyFlag_MapPoints, 0);
Next to that, you need to subscribe to the events for each device, which can be done in the OnDevice function:
static void OnDevice(const LEAP_DEVICE_INFO *props, const LEAP_DEVICE device) {
LeapSubscribeEvents(*connectionHandle, device);
}
Now the real experimentation can begin!