using AX.MessageSystem; using System.Collections; using UniRx; using UnityEngine; using UnityEngine.UI; public class UIFollowTarget : MonoBehaviour { private Transform Target; [HideInInspector] public Button m_Button; public string IconName; public float DistanceY = 0f; //显示文字 public bool ShowInfo; private Text m_Text; public string Info; //拉近 public bool ZoomIn = true; public ZoomInMode Mode = ZoomInMode.Normal; public float RotX = 0; public float RotY = 30; public float Distance = 5f; //切换楼层 public bool ChangeFloor; public int FloorNumber; public string Buildingfilter = "Floor"; //显示属性面板 public bool ShowAttrubePanel; public bool isRendering; public void LoadIcon(bool isLoad) { if (isLoad) { Target = transform; if (GameObject.Find(this.name + "Icon") == null) { //GameObject go = Instantiate(Loaded.Result); GameObject go = Instantiate(AssetManager.Instance.Icons.Find(icon => icon.name==IconName))as GameObject; go.name = this.name + "Icon"; go.transform.SetParent(UIManager.GetUIRoot(UIViewType.Icon), false); m_Button = go.GetComponent