|
|
@ -142,5 +142,34 @@ public class DeviceObj : MonoBehaviour |
|
|
|
tIconObj.gameObject.SetActive(isShow); |
|
|
|
tIconObj.gameObject.SetActive(isShow); |
|
|
|
gameObject.GetComponent<MeshRenderer>().enabled = isShow; |
|
|
|
gameObject.GetComponent<MeshRenderer>().enabled = isShow; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void SetBindData() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
string deviceId = ""; |
|
|
|
|
|
|
|
foreach (var item in DevicePanelManager.Instance.BindObjectList) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (item.ObjName == name) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
deviceId = item.DeviceId; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(deviceId)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach (var datalist in DevicePanelManager.Instance.AllData) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (datalist.Key == BindType) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach (var data in datalist.Value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (deviceId == data.deviceNo) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
BindData = data; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|