public void SelectSwatchForLight(LevelEntity_Light light, bool invokeToggleEvents = false) { var matchingSwatch = currentSwatches.First(swatch => swatch.GetComponent <Swatch_Light>().RuntimeLight == light); var matchingToggle = matchingSwatch.GetComponent <Toggle>(); ActivateToggle(matchingToggle, invokeToggleEvents); }
public void SetInitialValues(LevelEntity_Light runtimeLight, ToggleGroup toggleGroup) { RuntimeLight = runtimeLight; label.text = runtimeLight.NativeIndex.ToString(); var toggle = GetComponent <Toggle>(); toggle.group = toggleGroup; }