public void addToList(Location destination) { switch (destination) { case Location.core: if (coreDropList == null) { // References are lost when reloading scenes. They must be reconnected to avoid breaking scripts. coreDropList = GameObject.Find("Core Findings").GetComponent <DropListController>(); } coreDropList.add(currentFinding); break; case Location.extremity: if (extremityDropList == null) { // References are lost when reloading scenes. They must be reconnected to avoid breaking scripts. extremityDropList = GameObject.Find("Extremity Findings").GetComponent <DropListController>(); } extremityDropList.add(currentFinding); break; default: Debug.LogError("Bad location type was specified. Unable to add finding to drop list."); break; } currentFinding = null; }