设备连接界面完善
This commit is contained in:
1 parent
3a360d3437
commit
cdccd78602
11 files changed
+1754
-517
No files matched your search
@@ -125,7 +125,12 @@ public class DeviceView : MonoBehaviour
|
||||
{
|
||||
if (deviceModal == null)
|
||||
{
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var obj = Resources.Load("UI/Prefab/Device/Mobile/ConnectDeviceModal");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
#endif
|
||||
GameObject gameObject = (GameObject)Instantiate(obj);
|
||||
deviceModal = gameObject.GetComponent<ConnectDeviceModal>();
|
||||
}
|
||||
@@ -140,7 +145,11 @@ public class DeviceView : MonoBehaviour
|
||||
// device.Disconnect();
|
||||
//}
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var obj = Resources.Load("UI/Prefab/Device/Mobile/ConnectDeviceModal");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
#endif
|
||||
GameObject gameObject = (GameObject)Instantiate(obj);
|
||||
deviceModal = gameObject.GetComponent<ConnectDeviceModal>();
|
||||
deviceModal.SensorType = this.SensorType;
|
||||
@@ -234,13 +243,18 @@ public class DeviceView : MonoBehaviour
|
||||
{
|
||||
mSearchButton.SetActive(false);
|
||||
mPairButton.SetActive(true);
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
searchState.gameObject.SetActive(false);
|
||||
#endif
|
||||
logo.sprite = sprite1;
|
||||
|
||||
//App.MainDeviceAdapter.GetDevices().First(d => d.Sensor == SensorType).Connect();
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
mSearchButton.SetActive(true);
|
||||
#endif
|
||||
mPairButton.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user