// Start is called before the first frame update private void Awake() { pathFinder = GetComponent <PathfinderAStar>(); pathRenderer = GetComponent <PathRenderer>(); pathVisualizer = GetComponent <PathVisualizer>(); unitHandler = GameObject.FindObjectOfType <CurrentUnitHandler>(); }
//This are different. You can focus on any unit, assuming it is the players turn. The only unit who can take action however is the activeturnunit. private void Awake() { unitHandler = GetComponent <CurrentUnitHandler>(); unitCarousel = GameObject.FindObjectOfType <UI_UnitCarousel>(); CollectUnits(); }
private void Awake() { unitHandler = GetComponent <CurrentUnitHandler>(); }