using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PLayerBTn : MonoBehaviour { public Button PickButton; public Button DropButton; public UseSkill UseSkill; // Start is called before the first frame update void Start() { UseSkill=this.gameObject.GetComponent(); DropButton.onClick.AddListener(() => { UseSkill.Drop(); }); PickButton.onClick.AddListener(() => { UseSkill.Pick(); }); } // Update is called once per frame void Update() { } }