// Start is called before the first frame update void Start() { priceList = GameObject.Find("BuildingSpawner").GetComponent <ListBuildingTypePrices>(); smallList = new List <Dropdown.OptionData>(); biggerList = new List <Dropdown.OptionData>(); completeList = new List <Dropdown.OptionData>(); dropdown = GetComponent <Dropdown>(); smallList.Add(dropdown.options[0]); smallList.Add(dropdown.options[1]); biggerList.Add(dropdown.options[0]); biggerList.Add(dropdown.options[1]); biggerList.Add(dropdown.options[2]); // farm completeList.Add(dropdown.options[0]); completeList.Add(dropdown.options[1]); completeList.Add(dropdown.options[2]); completeList.Add(dropdown.options[3]); completeList.Add(dropdown.options[4]); completeList.Add(dropdown.options[5]); dropdown.ClearOptions(); dropdown.AddOptions(smallList); //displayFullList = false; }
void Start() { ListBuildingTypePrices priceScript = GameObject.Find("BuildingSpawner").GetComponent <ListBuildingTypePrices>(); price = priceScript.GetBuildingPrice(gameObject.name.ToLower()); }