using System.Collections; using System.Collections.Generic; using UnityEngine; public class CraftStation : MonoBehaviour { private void OnTriggerStay2D(Collider2D other) { if (other.tag == "Player") { //ui enable // other.GetComponent().ShowCraftUI(this); } } private void OnTriggerExit2D(Collider2D other) { if (other.tag == "Player") { //ui disable other.GetComponent().HideCraftUI(); } } }