public void UnselectObject() { if (SelectedObject) { SelectedObject.transform.SetParent(previousParent); SelectedObject.GetComponent <ISelectable>()?.Unselect(); Unselect?.Invoke(SelectedObject); SelectedObject = null; } }
/// <summary> /// This is called when an option is unhighlighted (another option is selected) in the /// ListMenu. /// </summary> public virtual void OnUnselected() { IsSelected = false; Unselect?.Invoke(this, EventArgs.Empty); }