public void OnBeginDrag(PointerEventData eventData) { if (!CanDrag()) { return; } itemBeingDragged = this; parentSlot.Select(); GetComponent <CanvasGroup>().blocksRaycasts = false; }
private void Start() { if (instance == null) { instance = this; } else if (instance != this) { Debug.LogError("Duplicate " + this.GetType().Name); Destroy(gameObject); } }
private void EndDrag() { itemBeingDragged = null; transform.localPosition = Vector3.zero; GetComponent <CanvasGroup>().blocksRaycasts = true; }