diff --git a/Assets/Plugins/NetCoreServer.dll b/Assets/Plugins/NetCoreServer.dll index 96c5d745..91171372 100644 Binary files a/Assets/Plugins/NetCoreServer.dll and b/Assets/Plugins/NetCoreServer.dll differ diff --git a/Assets/Scripts/Devices/Ble/Win/ServiceUuids.cs b/Assets/Scripts/Devices/Ble/Win/ServiceUuids.cs index 03942c89..191766f4 100644 --- a/Assets/Scripts/Devices/Ble/Win/ServiceUuids.cs +++ b/Assets/Scripts/Devices/Ble/Win/ServiceUuids.cs @@ -167,6 +167,15 @@ namespace Assets.Scripts.Ble }; public static readonly IReadOnlyList CyclingServices = ServiceUuids.Services.Where(s => s.IsCycling).ToList(); + public static List GetServiceUuidList() + { + List list = new List(); + foreach (var item in Services) + { + list.Add(item.IdGuid.ToString()); + } + return list; + } public static ServiceUuid Get(byte[] type) { return ServiceUuids.Services.Single(s => s.IdByteArray == type); diff --git a/Assets/Scripts/Devices/Ble/mobile/BleMobileThread.cs b/Assets/Scripts/Devices/Ble/mobile/BleMobileThread.cs index a9db13d0..701ee78c 100644 --- a/Assets/Scripts/Devices/Ble/mobile/BleMobileThread.cs +++ b/Assets/Scripts/Devices/Ble/mobile/BleMobileThread.cs @@ -66,7 +66,8 @@ namespace Assets.Scripts.Devices.Ble } public void StartWatcher() { - BluetoothLEHardwareInterface.ScanForPeripheralsWithServices(null, null, (address, name, rssi, bytes) => + + BluetoothLEHardwareInterface.ScanForPeripheralsWithServices(ServiceUuids.GetServiceUuidList().ToArray(), null, (address, name, rssi, bytes) => { ScanInfoReceived?.Invoke(this, address, name, rssi, bytes); }, true); diff --git a/Assets/Scripts/Scenes/Ride/Scripts/NearByFactory.cs b/Assets/Scripts/Scenes/Ride/Scripts/NearByFactory.cs index 1ce979a6..2eea9060 100644 --- a/Assets/Scripts/Scenes/Ride/Scripts/NearByFactory.cs +++ b/Assets/Scripts/Scenes/Ride/Scripts/NearByFactory.cs @@ -1,6 +1,7 @@ using Assets.Scenes.Ride.Scripts.Model; using System.Linq; using UnityEngine; +using UnityEngine.EventSystems; using UnityEngine.UI; namespace Assets.Scenes.Ride.Scripts @@ -24,7 +25,7 @@ namespace Assets.Scenes.Ride.Scripts Title = transform.Find("Title").GetComponent(); OnlineUserNum = transform.Find("NearByView/OnlineUserNum").GetComponent(); - pageSize = 999;//开启无线下拉 + pageSize = 5;//开启无线下拉 } protected override void CreateList() { @@ -49,6 +50,7 @@ namespace Assets.Scenes.Ride.Scripts Create(nearList[i]); } } + private void Create(NearRiderModel item) { var rankingList = FindObjectsOfType();