public void GenListItems(List <GameObject> molecules, ChemViewARController chemViewARController, ChemviewHelper.MoleculeSubType filter = ChemviewHelper.MoleculeSubType.All) { foreach (Transform child in contentPanel.transform) { Destroy(child.gameObject); } foreach (GameObject molecule in molecules) { if (filter == ChemviewHelper.MoleculeSubType.All) { GenMolButton(molecule); } else { if (molecule.GetComponentInChildren <MoleculeController>().moleculeSubType == filter) { GenMolButton(molecule); } } } molsList = molecules; chemViewController = chemViewARController; }
public void DropdownValueChanged(Dropdown change) { GameObject newSelectedMol = Array.Find(molsArray, mol => mol.name.Equals(change.options[change.value].text)); ChemViewARController ChemController = ChemViewARControllerOBJ.GetComponent <ChemViewARController>(); ChemController.loadedChemModel = newSelectedMol; _ShowAndroidToastMessage("Molecule changed to: " + newSelectedMol.name); }
public void SetMolSelectInfoSheet(ChemViewARController chemviewController) { MoleculeController selectedMol = chemviewController.loadedChemModel.GetComponentInChildren <MoleculeController>(); molName.text = selectedMol.moleculeName; subText1.text = selectedMol.molInfo1; subText2.text = selectedMol.molInfo2; subText3.text = selectedMol.molInfo3; subText4.text = selectedMol.molInfo4; molpreviewImage.sprite = selectedMol.molImage; }