private arduinoReceiver sendMeBikeOrder; //should only be one of these so should be a static and calling the static or its singular instance void Start() { dropDowns = GetComponentsInChildren <Dropdown>(); Debug.Log("I found " + dropDowns.Length + " dropdowns"); //why called twice sendMeBikeOrder = GameObject.Find("ArduinoHolder").GetComponent <arduinoReceiver>(); updateTheIndexAndImageLabels(); }
// Use this for initialization void Start() { arduino = GameObject.Find("ArduinoHolder").GetComponent <arduinoReceiver>(); thisDropDown = GetComponent <Dropdown>(); thisDropDown.onValueChanged.AddListener(delegate { DropdownValueChanged(thisDropDown); }); }
// Use this for initialization void Start() { arduino = GameObject.Find("ArduinoHolder").GetComponent <arduinoReceiver>(); thisToggle = GetComponent <Toggle>(); thisToggle.onValueChanged.AddListener(delegate { ToggleValueChanged(thisToggle); }); }