public void Refresh(HapticDevice tactDevice, Bhaptics_Widget_Setting setting)
        {
            device                    = tactDevice;
            deviceName.text           = device.DeviceName;
            toggleButton.interactable = tactDevice.IsConnected;

            if (!AndroidUtils.CanChangePosition(tactDevice.Position))
            {
                toggleButton.gameObject.SetActive(false);
            }
            else
            {
                if (tactDevice.IsConnected)
                {
                    if (AndroidUtils.IsLeft(device.Position))
                    {
                        toggleButton.image.sprite = leftSide;
                    }
                    else
                    {
                        toggleButton.image.sprite = rightSide;
                    }
                }

                toggleButton.gameObject.SetActive(true);
            }

            if (setting != null)
            {
                deviceImage.sprite = setting.GetPairedDeviceSprite(device);
            }
        }
Beispiel #2
0
 public void Refresh(HapticDevice tactDevice, Bhaptics_Widget_Setting setting)
 {
     device          = tactDevice;
     deviceName.text = device.DeviceName;
     if (setting != null)
     {
         deviceImage.sprite = setting.GetScannedDeviceSprite(device.DeviceName);
     }
 }