private void Start() { buildingPreview = GetComponent <BuildingPreview>(); stoneEfficiency = StoneEfficiency.instance; stoneEfficiency.efficiencyText.transform.position = Camera.main.WorldToScreenPoint(transform.position) + new Vector3(0, 50, 0); stoneEfficiency.efficiencyText.gameObject.SetActive(true); stoneEfficiency.SetCirclesState(true); line = Instantiate(linePrefab, position: transform.position, rotation: Quaternion.identity); }
private void OnDestroy() { Destroy(line.gameObject); stoneEfficiency.SetCirclesState(false); stoneEfficiency.efficiencyText.gameObject.SetActive(false); }