// Use this for initialization void Start() { var t = GameObject.FindObjectsOfType <ComboBox>(); foreach (var cutObject in CutObjectManager.Get.CutObjects) { listViewUI.Add(cutObject.name); } if (comboBox.ListView.DataSource.Count == 0) { for (CutType type = CutType.Plane; type <= CutType.None; type++) { string value2 = type.ToString(); comboBox.ListView.Add(value2); } } CutObjectAlphaSlider.value = CutObject.CutObjectAlphaStatic; //if (comboBox2.ListView.DataSource.Count == 0) //{ // comboBox2.ListView.Add("Show Current"); // comboBox2.ListView.Add("Show All"); // comboBox2.ListView.Add("Hide All"); //} //comboBox2.Set("Show Current", false); }
// ******** Misc CutType GetCutTypeFromName(string name) { for (CutType type = CutType.Plane; type <= CutType.None; type++) { if (name == type.ToString()) { return(type); } } throw new Exception("Cut type not found"); }