移动端蓝牙优化

This commit is contained in:
lishuo authored and CaiYanPeng committed 2022-06-09 14:52:50 +08:00
1 parent 72f254af2a
commit 2f64aa494f
10 files changed
+84 -16

No files matched your search

@@ -24,10 +24,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;
@@ -48,4 +48,13 @@ public class RowerDevicePanel : PFUIPanel
timer += 1f;
}
}
protected override void OnDisable()
{
App.MainDeviceAdapter.StopScan();
}
protected override void OnDestroy()
{
App.MainDeviceAdapter.StopScan();
}
}