private void OnBluetoothDeviceTypeChangedCallback(EBluetoothDeviceType bluetoothDeviceType) { this.m_bluetoothDeviceType = bluetoothDeviceType; if (this.m_device != null) { this.m_device.Disconnect(); this.m_device = null; BluetoothEvents.OnBluetoothDeviceStateChangedEvent -= OnBluetoothStateChangedCallback; } }
private void OnBluetoothDeviceChangedHandler(EBluetoothDeviceType bluetoothDeviceType) { m_btnConnectA.SetActive(bluetoothDeviceType == EBluetoothDeviceType.BLUETOOTH_CLASSIC); m_btnBLE_1.SetActive(bluetoothDeviceType == EBluetoothDeviceType.BLUETOOTH_LOW_ENERGY); m_btnBLE_2.SetActive(bluetoothDeviceType == EBluetoothDeviceType.BLUETOOTH_LOW_ENERGY); }