public void ShowObj(bool val, int scale = 100) { if (menuObj == null && val == true) { initMenu(); } if (obj == null && val == true) { if (type == 1) { obj = pointCloud.create(CppInterface.GetMPList(id)); } if (type == 2) { obj = KFListObj.create(CppInterface.GetKFList(id), ListId).transform; } if (type == 3) { RdSegData = CppInterface.GetRSList(id); if (showCount > RdSegData.Count || showCount <= 0) { showCount = RdSegData.Count; } obj = RoadMesh.create(RdSegData.GetRange(0, showCount)).transform; } if (type == 5) { ChannelInfo img = ChannelInfo.getChannel(5, id); ChannelInfo feature = ChannelInfo.getChannel(4, id); if (img != null) { commonObj.mMainUI.updateFrameDisplay(img, feature); } } if (type == 6) { List <TraficSign> tmp = CppInterface.GetTSList(id); if (showCount >= 0 && showCount < tmp.Count) { tmp.RemoveRange(showCount, tmp.Count - showCount); } obj = TraficSignMesh.create(tmp).transform; } if (type == 7) { List <ActMapPoint> tmp = CppInterface.GetAMPList(id); obj = ActMPMesh.create(tmp); } } if (obj != null) { obj.gameObject.SetActive(val); if (val) { transform.Find("Text").GetComponent <Text> ().color = getColorFromUI(); } else { transform.Find("Text").GetComponent <Text> ().color = new Color32(0, 0, 0, 255); } } }