/// <summary> /// Метод создания Tooltip. Срабатывает при наведении курсора на ItemView. /// </summary> /// <param name="eventData"></param> public void OnPointerEnter(PointerEventData eventData) { var rectT = GetComponent <RectTransform>(); Vector3 pos = new Vector3 { x = rectT.transform.position.x + rectT.rect.width / 2 * _commonField.transform.localScale.x, y = rectT.transform.position.y - rectT.rect.height / 2 * _commonField.transform.localScale.y, z = 0 }; _tooltipInstance = Instantiate(ToolTipView, pos, new Quaternion(), _commonField.transform); _tooltipInstance.SetTooltipInfo(item.Name, item.FlavorText); }