/* check if any groups of proteins are active */ private bool checkActive() { //assign active protein to UI interface activeKey = GameObject.FindWithTag("activeKey"); activeProtein = GameObject.FindWithTag("activeProtein"); //make sure models exist if (activeKey != null && activeProtein != null) { animateProteinScript = activeProtein.GetComponent<AnimateProtein>(); enableModelScript = activeKey.GetComponent<EnableModel>(); return true; } Debug.LogError("None of the protein models are active."); return false; }
/* check if any groups of proteins are active */ private bool checkActive() { //assign active protein to UI interface activeKey = GameObject.FindWithTag("activeKey"); activeProtein = GameObject.FindWithTag("activeProtein"); //make sure models exist if (activeKey != null && activeProtein != null) { animateProteinScript = activeProtein.GetComponent <AnimateProtein>(); enableModelScript = activeKey.GetComponent <EnableModel>(); return(true); } Debug.LogError("None of the protein models are active."); return(false); }