using System.Collections; using System.Collections.Generic; using UnityEngine; public class UICreate : MonoBehaviour { public GameObject prefab; public Transform target; [HideInInspector] public GameObject obj; public void Show() { if (obj == null) obj = ResourcePool.ObjectCreateStatic(prefab, target); obj.SetActive(true); } }