Пример #1
0
    private void HandleDeviceRemoved(InputDevice device)
    {
        switch (device.role)
        {
        case InputDeviceRole.Generic: HeadsetNode.OnDisconnect(); break;

        case InputDeviceRole.LeftHanded: LeftHandNode.OnDisconnect(); break;

        case InputDeviceRole.RightHanded: RightHandNode.OnDisconnect(); break;

        default: break;
        }
    }
Пример #2
0
    private void HandleDeviceUpdate(InputDevice device)
    {
        switch (device.role)
        {
        case InputDeviceRole.Generic: HeadsetNode.UpdateConnected(); break;

        case InputDeviceRole.LeftHanded: LeftHandNode.UpdateConnected(); break;

        case InputDeviceRole.RightHanded: RightHandNode.UpdateConnected(); break;

        default: break;
        }
    }