From 71ae54aabe5bfc16af217c348693827a12fcd773 Mon Sep 17 00:00:00 2001 From: lishuo Date: Mon, 18 Jul 2022 17:12:57 +0800 Subject: [PATCH] =?UTF-8?q?ios=E8=BF=9E=E6=8E=A5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E4=BF=A1=E6=81=AF=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Plugins/iOS/UnityBluetoothLE.mm | 4 +++- Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Plugins/iOS/UnityBluetoothLE.mm b/Assets/Plugins/iOS/UnityBluetoothLE.mm index e794b768..9e97a5ff 100644 --- a/Assets/Plugins/iOS/UnityBluetoothLE.mm +++ b/Assets/Plugins/iOS/UnityBluetoothLE.mm @@ -795,9 +795,11 @@ extern "C" { - (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error { + NSLog(@"ConnectionError~~connectPeripheral:peripheral "); if (error) { - NSString *message = [NSString stringWithFormat:@"Error~%@", error.description]; + NSString *identifier = [[peripheral identifier] UUIDString]; + NSString *message = [NSString stringWithFormat:@"ConnectionError~%@~%@",identifier,error.description]; UnitySendMessage ("BluetoothLEReceiver", "OnBluetoothMessage", [message UTF8String] ); } } diff --git a/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs b/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs index 279835d7..45a41c1a 100644 --- a/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs +++ b/Assets/Scripts/UI/Prefab/ResultList/ResultListController.cs @@ -96,7 +96,7 @@ public class ResultListController : PFUIPanel UIManager.AddEvent(matchScroll.gameObject, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag); } scrolls = new Transform[] { routeScroll, matchScroll}; - GetList(0); + //GetList(0); GetList(1); } @@ -157,7 +157,7 @@ public class ResultListController : PFUIPanel }; Dictionary pageIndex = new Dictionary { - {0,0 },{1,0 },{2,0 } + {0,0 },{1,0 } }; async void GetList(int? sindex = null) {