private void DisableSelection() { if (selectable != null && selectable.gameObject == EventSystemManager.GetCurrentSelection()) { EventSystemManager.SetSelectionNull(); } }
private void UpdateSlotArray() { GameObject aux = EventSystemManager.GetCurrentSelection(); GameObject finalSelectable = _slotArray.Get(); if (_slotArray == null) { return; } if (aux != null && finalSelectable != aux) { currentSelectable = aux.GetComponent <Selectable>(); if (_slotArray.IsEmpty() || aux != _slotArray.Get()) { OnNewFocus?.Invoke(aux); } _slotArray.Add(aux); finalSelectable = aux; } if (finalSelectable == null || !finalSelectable.activeSelf || (currentSelectable != null && !currentSelectable.interactable)) { GameObject newObj = _slotArray.Remove(); if (newObj) { SetNewSelection(newObj, false); } } }
public static GameObject GetFocus() { return(EventSystemManager.GetCurrentSelection()); }
public static void PreserveCurrentFocus() { _focusSaved = EventSystemManager.GetCurrentSelection(); }