void Start() { if (tooltipRect == null || descriptionText == null) { try { tooltipRect = GameObject.Find("Tooltip Rect"); descriptionText = tooltipRect.transform.GetComponentInChildren <TextMeshProUGUI>(); } catch { Debug.LogError("No Tooltip Rect assigned.", this); } } if (tooltipRect != null) { tpManager = tooltipRect.GetComponentInParent <TooltipManager>(); tooltipAnimator = tooltipRect.GetComponentInParent <Animator>(); } }
private void OnEnable() { tooltipTarget = (TooltipManager)target; }