private void Update() { if (isPickedItem == true) { Vector2 position; RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas.transform as RectTransform, Input.mousePosition, null, out position); PickedItem.SetItemUIPosition(position); } if (isShowToolTip == true) { Vector2 position; RectTransformUtility.ScreenPointToLocalPointInRectangle(canvas.transform as RectTransform, Input.mousePosition, null, out position); toolTip.SetToolTipPosition(position + vector2); } if (isPickedItem == true && Input.GetMouseButtonDown(0) && UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject(-1) == false) { isPickedItem = false; PickedItem.HideItemUI(); } }