/// <summary> /// 初始化loader路径 /// </summary> public static void InitGameLoader() { AnimationLoader.InitAniLoader( CommonValue.AniDir, CommonValue.AniWWWDir, CommonValue.InAniDir, CommonValue.InAniWWWDir, CommonValue.NetAniDir); BoneLoader.InitPlayerBone( CommonValue.BoneDir, CommonValue.BoneWWWDir, CommonValue.InBoneDir, CommonValue.InBoneWWWDir, CommonValue.NetBoneDir); ModelLoader.InitModelLoader( CommonValue.MaterialDir, CommonValue.MaterialWWWDir, CommonValue.InMaterialDir, CommonValue.InMaterialWWWDir, CommonValue.NetMaterialDir); SkinnLoader.InitSkinLoader( CommonValue.MaterialDir, CommonValue.MaterialWWWDir, CommonValue.InMaterialDir, CommonValue.InMaterialWWWDir, CommonValue.NetMaterialDir); UIWndLoader.InitUIWndLoader( CommonValue.UIDir, CommonValue.UIWWWDir, CommonValue.InUIDir, CommonValue.InUIWWWDir, CommonValue.NetUIDir); UIAtlasLoader.InitUIAtlasLoader( CommonValue.UIAtlasDir, CommonValue.UIAtlasWWWDir, CommonValue.InUIAtlasDir, CommonValue.InUIAtlasWWWDir, CommonValue.NetUIAtlasDir); ExtraLoader.InitExtraLoader( CommonValue.UITextureDir, CommonValue.UITextureWWWDir, CommonValue.InUITextureDir, CommonValue.InUITextureWWWDir, CommonValue.NetUITextureDir); SceneLoader.InitSceneLoader( CommonValue.StageWWWDir, CommonValue.StageDir, CommonValue.InStageWWWDir, CommonValue.InStageDir, CommonValue.NetStageDir ); }
IEnumerator DestoryAllWndAsync() { UICoroutine.uiCoroutine.gameObject.SetActive(false); //停止所有UICoroutine UICoroutine.uiCoroutine.gameObject.SetActive(true); int showIDCount = m_lstShowUIID.Count; for (int i = 0; i < showIDCount; ++i) { UIFlag hideID = m_lstShowUIID[i]; UIWnd hideWnd = GetUIWnd(hideID); if (hideWnd != null) { hideWnd.OnHideWnd(); hideWnd.gameObject.SetActive(false); } } m_lstShowUIID.Clear(); Dictionary <UIFlag, UIWnd> mapAllMap = new Dictionary <UIFlag, UIWnd>(m_mapAllUIWnd); m_mapAllUIWnd.Clear(); m_lstCacheUIID.Clear(); foreach (KeyValuePair <UIFlag, UIWnd> kvp in mapAllMap) { if (kvp.Value != null && kvp.Value.gameObject) { GameObject.Destroy(kvp.Value.gameObject); yield return(null); //wait for a frame } UIWndLoader.ReleaseUIWnd(kvp.Key.ToString()); } mapAllMap.Clear(); ////DynamicPrefabMgr.Instance.OnDestroyUI(); UIWndLoader.ReleaseAllUIWnd(); //check again UIAtlasLoader.ReleaseAllAtlas(); //TipsBoxMgr.HideAllTipsBox(); //MsgWaitMgr.StopWaiting(); //LoadingMgr.HideViolently(); }