예제 #1
0
        public static void GetDevicesAtXRNode(XRNode node, List <InputDevice> inputDevices)
        {
            if (null == inputDevices)
            {
                throw new ArgumentNullException("inputDevices");
            }

            List <UInt64> deviceIds = new List <UInt64>();

            InputTracking.GetDeviceIdsAtXRNode_Internal(node, deviceIds);

            inputDevices.Clear();
            foreach (var deviceId in deviceIds)
            {
                InputDevice nodeDevice = new InputDevice(deviceId);
                if (nodeDevice.isValid)
                {
                    inputDevices.Add(nodeDevice);
                }
            }
        }
예제 #2
0
        public static void GetDevicesAtXRNode(XRNode node, List <InputDevice> inputDevices)
        {
            bool flag = inputDevices == null;

            if (flag)
            {
                throw new ArgumentNullException("inputDevices");
            }
            List <ulong> list = new List <ulong>();

            InputTracking.GetDeviceIdsAtXRNode_Internal(node, list);
            inputDevices.Clear();
            foreach (ulong current in list)
            {
                InputDevice item    = new InputDevice(current);
                bool        isValid = item.isValid;
                if (isValid)
                {
                    inputDevices.Add(item);
                }
            }
        }