private void Awake() { eventSystem = FindObjectOfType <EventSystem>(); tooltipController = FindObjectOfType <BuildingTooltipController>(); // Add a new tooltip prefab if one does not exist yet if (!tooltipController) { tooltipController = AddTooltipPrefabToScene(); } if (!tooltipController) { Debug.LogWarning("Could not find the Tooltip prefab"); } if (GetComponent <RectTransform>()) { isUIObject = true; } }
private void Awake() { m_Cursor = FindObjectOfType <MapCursor>(); m_Tooltip = FindObjectOfType <BuildingTooltipController>(); }