private void OnSelectionChanged(Selectable selectable) { if (selectable != null) { _canvasGroup.alpha = 1f; _canvasGroup.interactable = true; } else { _canvasGroup.alpha = 0f; _canvasGroup.interactable = false; } }
public void Select(Selectable selectable) { _selectedObject = _selectedObject == selectable ? null : selectable; SelectionChanged?.Invoke(_selectedObject); }