移动端蓝牙优化

This commit is contained in:
lishuo committed 2022-06-09 14:51:03 +08:00
1 parent 5b54255777
commit 6542dd9882
10 files changed
+84 -16

No files matched your search

@@ -23,10 +23,10 @@ public class RowerDevicePanel : PFUIPanel
base.Show();
print("开启扫描");
#if UNITY_ANDROID || UNITY_IOS
App.MainDeviceAdapter.StartScan();
#if UNITY_ANDROID
Utils.CallAndroidMethod("OpenLocationService");
#endif
App.MainDeviceAdapter.StartScan();
#endif
}
float timer = 1f;
@@ -47,4 +47,13 @@ public class RowerDevicePanel : PFUIPanel
timer += 1f;
}
}
protected override void OnDisable()
{
App.MainDeviceAdapter.StopScan();
}
protected override void OnDestroy()
{
App.MainDeviceAdapter.StopScan();
}
}