Example #1
0
        public void ShowUI(ExpoUIType uiType)
        {
            var panel = _panelHolders.FirstOrDefault(a =>
                                                     a.UiType == uiType && (a.Platform == _currentPlatform || a.Platform == ExpoProjectPlatform.Universal));

            if (panel != null)
            {
                foreach (UIPanelHolder uiPanelHolder in _panelHolders)
                {
                    uiPanelHolder.Disable();
                }

                panel.Enable();
                _current = panel;

                if (panel.UiType == ExpoUIType.InGame)
                {
                    Invoke(nameof(DelayedSetUnlockInput), 0.1f);
                }
                else
                {
                    if (_expoRig != null && _expoRig.isActiveAndEnabled)
                    {
                        _expoRig.SetLockInput(true);
                    }
                }
            }
        }
Example #2
0
 public void SwitchTo(ExpoUIType uiType)
 {
     _uiManager?.ShowUI(uiType);
 }