public void changeIn_submenu() { UIchange(); testRod.crossSection_img(submenu); testRod.update(); updateLength(); }
public void changeshape() { UIchange(); //Remove old item from display objectParameters[currentShape].SetActive(false); testRod.getRepresentation().SetActive(false); //Collect required information to put onto new item float temp1 = lengthBar.transform.GetChild(0).GetComponent <Slider>().value; int temp2 = mat.GetComponent <Dropdown>().value; //get current item currentShape = selectedShape.GetComponent <Dropdown>().value; testRod = testRods[currentShape].GetComponent <TortionRod>(); testRod.changeSubmenu(submenu); submenu.value = 0; //Turn new item on objectParameters[currentShape].SetActive(true); testRod.getRepresentation().gameObject.SetActive(true); testRod.activesliders(); //Correct for values to be transfered over lengthBar.transform.GetChild(0).GetComponent <Slider>().value = temp1; mat.GetComponent <Dropdown>().value = temp2; float d1 = dimentions.transform.GetChild(0).GetChild(0).GetComponent <Slider>().value; dimentions.transform.GetChild(1).GetChild(0).GetComponent <Slider>().value = d1; updateLength(); updateMaterial(); changeIn_submenu(); updateShearStress(); testRod.update(); }