public void Start() { List <Character> roster = state.hr.GetRosterCharacters(); for (int i = 0; i < roster.Count; ++i) { HeroRosterSlot slot = Instantiate <HeroRosterSlot>(slotPrefab, slotParent.transform); slot.Init(roster[i], this); slots.Add(roster[i], slot); UnitSelection selection = Instantiate <UnitSelection>(selectionPrefab, selectionParent.transform); Vector2 position = start.anchoredPosition; position.x += i * 200; selection.SetPositionImmediate(position); selection.Init(roster[i], this); units.Add(roster[i], selection); } }