private void DisableSelection()
 {
     if (selectable != null && selectable.gameObject == EventSystemManager.GetCurrentSelection())
     {
         EventSystemManager.SetSelectionNull();
     }
 }
Exemple #2
0
        private void DisableObject()
        {
            EventSystemManager.SetSelectionNull();

            foreach (Transform child in _buttonsContainer)
            {
                if (child == null)
                {
                    continue;
                }

                if (child.TryGetComponent <Button>(out Button button))
                {
                    button.onClick.RemoveListener(DisableObject);
                }
            }

            if (finishQustionEnum == FinishQustionEnum.Destroy)
            {
                GameObjectExtend.DestroyGameObject(gameObject);
            }
            else if (finishQustionEnum == FinishQustionEnum.Disactive)
            {
                gameObject.SetActive(false);
            }
        }
 public void LeaveFocus()
 {
     if (_isFocusPage)
     {
         EventSystemManager.SetSelectionNull();
     }
     _isFocusPage = false;
     gameObject.SetActive(false);
 }
        public static void SetNullWhenNotActive()
        {
            GameObject finalSelectable = _slotArray.Get();

            if (finalSelectable != null && !finalSelectable.activeSelf)
            {
                EventSystemManager.SetSelectionNull();
            }
        }