示例#1
0
        public void UnselectObject()
        {
            if (SelectedObject)
            {
                SelectedObject.transform.SetParent(previousParent);
                SelectedObject.GetComponent <ISelectable>()?.Unselect();

                Unselect?.Invoke(SelectedObject);
                SelectedObject = null;
            }
        }
示例#2
0
 /// <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);
 }