public void OnEndDrag(PointerEventData eventData) { SfxManager.Instance.Play(SfxType.UI_DragEnd); OnDragEnd?.Invoke(); selectedObject = null; Destroy(this.gameObject); }
public void OnBeginDrag(PointerEventData eventData) { if (IsDraggable == false) { return; } SfxManager.Instance.Play(SfxType.UI_DragStart); OnDragBegin?.Invoke(); selectedObject = this; startPos = transform.position; IsDragging = true; }