private void InitializeDrag() { if (GameController.instance.crafter.view.transform.parent.gameObject.activeInHierarchy) { canvas = GameController.instance.crafter.view.craftPanel.transform.parent.GetComponent <Canvas>(); } else { canvas = FindObjectOfType <Seller>().view.transform.parent.GetComponent <Canvas>(); } dragger.SetCanvas(canvas); dragger.onBeginMethod += OnBeginDrag; dragger.onEndMethod += OnEndDrag; }
private void InitializeDrag() { dragger.SetCanvas(crafter.view.craftPanel.transform.parent.GetComponent <Canvas>()); dragger.onBeginMethod += OnBeginDrag; dragger.onEndMethod += OnEndDrag; }