蓝牙停止扫描和一些bug修复
This commit is contained in:
1 parent
0139cbc173
commit
d8927ceca5
16 files changed
+137
-71
No files matched your search
@@ -26,6 +26,7 @@ using UnityEngine;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
#if UNITY_ANDROID
|
||||
@@ -605,6 +606,7 @@ public class BluetoothLEHardwareInterface
|
||||
|
||||
public static void ConnectToPeripheral (string name, Action<string> connectAction, Action<string, string> serviceAction, Action<string, string, string> characteristicAction, Action<string> disconnectAction = null)
|
||||
{
|
||||
|
||||
#if !UNITY_EDITOR_OSX || !EXPERIMENTAL_MACOS_EDITOR
|
||||
if (!Application.isEditor)
|
||||
{
|
||||
@@ -614,7 +616,8 @@ public class BluetoothLEHardwareInterface
|
||||
bluetoothDeviceScript.ConnectedPeripheralAction = connectAction;
|
||||
bluetoothDeviceScript.DiscoveredServiceAction = serviceAction;
|
||||
bluetoothDeviceScript.DiscoveredCharacteristicAction = characteristicAction;
|
||||
bluetoothDeviceScript.ConnectedDisconnectPeripheralAction = disconnectAction;
|
||||
//bluetoothDeviceScript.ConnectedDisconnectPeripheralAction = disconnectAction;
|
||||
bluetoothDeviceScript.DeviceBleStatusDisconnectedAction = disconnectAction;
|
||||
}
|
||||
|
||||
#if EXPERIMENTAL_MACOS_EDITOR && (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX)
|
||||
|
||||
Reference in new issue
Block a user