Пример #1
0
        public void RefreshDisplayInfo(ViveRole.IMap roleMap)
        {
            var roleInfo    = roleMap.RoleValueInfo;
            var roleValue   = roleMap.GetBoundRoleValueByDevice(deviceSN);
            var deviceModel = ViveRoleBindingsHelper.GetDeviceModelHint(deviceSN);

            m_deviceSN.text = deviceSN;
            m_roleName.text = roleInfo.GetNameByRoleValue(roleValue);

            BindingInterfaceSpriteManager.SetupDeviceIcon(m_modelIcon, deviceModel, VRModule.IsDeviceConnected(deviceSN));
        }
Пример #2
0
        private void OnEnterDevice(uint deviceIndex)
        {
            var deviceState = VRModule.GetCurrentDeviceState(deviceIndex);
            var deviceSN    = deviceState.serialNumber;

            m_inputDeviceSN.text = deviceSN;
            CheckInputDeviceSN(deviceSN);

            m_modelIcon.gameObject.SetActive(true);
            BindingInterfaceSpriteManager.SetupDeviceIcon(m_modelIcon, deviceState.deviceModel, true);

            if (m_onMouseEnterDevice != null)
            {
                m_onMouseEnterDevice.Invoke(deviceSN);
            }
        }
Пример #3
0
 public void CheckInputDeviceSN(string inputStr)
 {
     if (string.IsNullOrEmpty(inputStr))
     {
         m_buttonCheck.interactable = false;
         m_modelIcon.gameObject.SetActive(false);
     }
     else
     {
         m_buttonCheck.interactable = true;
         m_modelIcon.gameObject.SetActive(true);
         uint deviceIndex;
         if (VRModule.TryGetConnectedDeviceIndex(inputStr, out deviceIndex))
         {
             BindingInterfaceSpriteManager.SetupDeviceIcon(m_modelIcon, VRModule.GetCurrentDeviceState(deviceIndex).deviceModel, true);
         }
         else
         {
             BindingInterfaceSpriteManager.SetupDeviceIcon(m_modelIcon, ViveRoleBindingsHelper.GetDeviceModelHint(inputStr), false);
         }
     }
 }
Пример #4
0
 public void UpdateModel()
 {
     BindingInterfaceSpriteManager.SetupTrackingDeviceIcon(m_imageModel, VRModule.GetCurrentDeviceState(deviceIndex).deviceModel, isBound);
 }