using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MuHua { /// /// 数据可视化 /// public class ModuleVisual { /// 创建可视化内容 public static void Create(ref Type value, Transform original, Transform parent) { if (value != null) { return; } Transform temp = CreateTransform(original, parent); value = temp.GetComponent(); } /// 创建Transform public static Transform CreateTransform(Transform original, Transform parent) { Transform temp = Transform.Instantiate(original, parent); temp.gameObject.SetActive(true); return temp; } /// 删除可视化内容 public static void Remove(Type visual) where Type : Component { if (visual != null) { GameObject.Destroy(visual.gameObject); } } } }