void Awake() { // attach the button to the script for testing... Button button = GetComponent <Button>(); Ingredient ingredient = GetComponent <Ingredient>(); button.onClick.AddListener(() => ingredient.AddToGlass()); }
void Awake() { // attach the button to the script for testing... Button button = GetComponent <Button>(); Ingredient ingredient = GetComponent <Ingredient>(); button.onClick.AddListener(() => ingredient.AddToGlass()); }