// Use this for initialization private void Start () { if (buttons == null) { buttons = GameUI.GetItemButtons(buttonsPoint ? buttonsPoint : gameObject); buttons.confirm.onClick.AddListener(Confirm); buttons.reject.onClick.AddListener(Reject); } }
public void OnDestroy () { if (buttons) { Destroy(buttons.gameObject); buttons = null; } }