/// <summary> /// Opens the U. /// </summary> /// <param name="_isCloseOthers">If set to <c>true</c> _is close others.</param> /// <param name="_uiTypes">_ui types.</param> /// <param name="_uiParams">_ui parameters.</param> private void OpenUI(bool _isCloseOthers, EnumUIType[] _uiTypes, GameObject _uiParent = null, params object[] _uiParams) { // Close Others UI. if (_isCloseOthers) { CloseUIAll(); } // push _uiTypes in Stack. for (int i = 0; i < _uiTypes.Length; i++) { EnumUIType _uiType = _uiTypes[i]; if (!dicOpenUIs.ContainsKey(_uiType)) { string _path = UIPathDefines.GetPrefabPathByType(_uiType); stackOpenUIs.Push(new UIInfoData(_uiType, _path, _uiParent, _uiParams)); } } // Open UI. if (stackOpenUIs.Count > 0) { CoroutineController.Instance.StartCoroutine(AsyncLoadData()); } }
/// <summary> /// Preloads the U. /// </summary> /// <param name="_uiType">_ui type.</param> public void PreloadUI(EnumUIType _uiType) { string path = UIPathDefines.GetPrefabPathByType(_uiType); //ResManager.Instance.ResourcesLoad(path); }