Exemplo n.º 1
0
        void Update()
        {
            GameObject currentSelected = EventSystem.current.currentSelectedGameObject;

            if (currentSelected != null && _selectables.Count > 0)
            {
                UITarget newCurrent = _selectables.Single(s => s.button == currentSelected.GetComponent <Button>());
                if (newCurrent != null && newCurrent != _current)
                {
                    _current = newCurrent;
                    UpdateHighlight();
                }
            }
        }
Exemplo n.º 2
0
 public void RemoveSelectable(UITarget sce)
 {
     _selectables.Remove(sce);
     _pool.DestroyItem(sce);
 }
Exemplo n.º 3
0
        public void RemoveElement(GameObject sceneElement)
        {
            UITarget sce = _selectables.First(s => s.target == sceneElement);

            RemoveSelectable(sce);
        }