/// <summary>
    /// 创建设备漂浮UI
    /// </summary>
    /// <param name="sisDev"></param>
    /// <param name="info"></param>
    /// <param name="isShow">是否显示</param>
    public GameObject CreateArchorFollowUI(GameObject archorDev, DepNode devDep, DevNode info)
    {
        GameObject targetTagObj = UGUIFollowTarget.CreateTitleTag(archorDev, Vector3.zero);

        if (UGUIFollowManage.Instance == null)
        {
            Debug.LogError("UGUIFollowManage.Instance==null");
            return(null);
        }
        Camera mainCamera = GetMainCamera();

        if (mainCamera == null)
        {
            return(null);
        }
        string devDepName = GetDepNodeId(devDep) + ArchorDevUIName;
        DisposeFollowTarget dispostTarget = targetTagObj.AddMissingComponent <DisposeFollowTarget>();

        dispostTarget.SetInfo(devDepName);

        //if (!DevDepNameList.Contains(devDepName)) DevDepNameList.Add(devDepName);
        GameObject          name         = UGUIFollowManage.Instance.CreateItem(ArchorDevUIPrefab, targetTagObj, devDepName, mainCamera, false, true);
        UGUIFollowTarget    followTarget = name.GetComponent <UGUIFollowTarget>();
        BaseStationFollowUI archorFollow = name.GetComponent <BaseStationFollowUI>();

        if (archorFollow != null)
        {
            archorFollow.InitInfo(info);
        }
        if (DevSubsystemManage.IsRoamState || !FunctionSwitchBarManage.Instance.ArchorInfoToggle.ison)
        {
            UGUIFollowManage.Instance.SetGroupUIbyName(devDepName, false);
        }
        return(name);
    }
示例#2
0
 /// <summary>
 /// 显示基站信息
 /// </summary>
 public void Open()
 {
     if (currentFollowUI != null && currentFollowUI != this)
     {
         currentFollowUI.StateToggle.isOn = false;
     }
     GetArchorDevInfo(value =>
     {
         window.SetActive(true);
         currentFollowUI = this;
         if (!value)
         {
             Title.text   = dev.Info.Name;
             CodeIp.text  = string.Format("<color=#6DECFEFF>Code:</color>{0}  <color=#6DECFEFF>IP:</color>{1}", "", "");
             CADInfo.text = string.Format("<color=#6DECFEFF>X:</color>{0} <color=#6DECFEFF>Y:</color>{1} <color=#6DECFEFF>Z:</color>{2}", "", "", "");
         }
     });
 }