void Start() { //create UnitCommander unitCommander = (UnitCommander)Instantiate(Resources.Load(("Prefabs/UnitCommander"), typeof(UnitCommander))); unitCommander.transform.position = transform.parent.position; unitCommander.transform.parent = transform.parent; unitCommander.SetClan(clan); //create BuildingCommander buildingCommander = (BuildingCommander)Instantiate(Resources.Load(("Prefabs/BuildingCommander"), typeof(BuildingCommander))); buildingCommander.transform.position = transform.parent.position; buildingCommander.transform.parent = transform.parent; buildingCommander.SetClan(clan); }