using System.Collections; using System.Collections.Generic; using UnityEngine; namespace BITKit { public class Selectable : MonoBehaviour, ISelectable { public Transform GetTransform() => transform; ISelectableComponent[] components; void Start() { components = GetComponentsInChildren(true); foreach (var x in components) { x.SetSelectionState(0); } } public void SetSelectionState(SelectionState state) { foreach (var x in components) { x.SetSelectionState(state); } } } }