protected virtual void Start() { controller = new ControllerMainMenu(this); for (int i = 0; i < transform.childCount; i++) { transform.GetChild(i).GetComponent <IMenuSelection>(); } current = transform.GetChild(_selectedOption).GetComponent <IMenuSelection>(); current.Highlight(); }
void Highlighting() { if (transform.GetChild(_selectedOption).gameObject.activeSelf) { current = transform.GetChild(_selectedOption).GetComponent <IMenuSelection>(); for (int i = 0; i < transform.childCount; i++) { transform.GetChild(i).GetComponent <IMenuSelection>().Unhighlight(); } current.Highlight(); } }