private void OnLoadUILoading() { UILoading.subTitle = "正在加载,请耐心等待"; UILoading.ShowLoading(); isInit = true; LoadNeedRes(); }
private void ShowLoadingBar() { UILoading.subTitle = "正在加载中,请耐心等待,<color=yellow>(此加载不消耗流量)</color>"; UILoading.ShowLoading(); gameObject.AddComponent <ResourceMgr>(); ResourceMgr.Instance.InitFunc = () => { otherStep++; OnNeedResLoaded(new object()); ResourceMgr.Instance.DownLoadBundles(URLConst.listInitGameRes.ToArray(), OnNeedResLoaded, ResourceMgr.DEFAULT_PRIORITY, OnDownLoadCallBack); }; }
public void Load(SceneVo Vo, Action <GameObject> callBack = null, string[] preloadAssets = null) { if (isLoading) { return; } UILoading.ShowLoading(string.Concat("正在进入", Vo.id, "场景..."), "正在预加载", 0); this.callBack = callBack; this.m_sceneId = Vo.id; SceneMgr.Instance.SceneVo = Vo; isLoading = true; _isLoadingComplete = false; GameObjectExt.Destroy(m_kScenePrefab); // Loadinge string[] sceneURLs; int len = 1; if (preloadAssets == null) { sceneURLs = new string[len]; } else { sceneURLs = new string[len + preloadAssets.Length]; for (int i = 0; i < preloadAssets.Length; i++) { sceneURLs[len + i] = preloadAssets[i]; } } sceneURLs[0] = URLConst.GetScenePrefab(Vo.id); ResourceMgr.Instance.DownLoadBundles( sceneURLs, DownLoadComplete, ResourceMgr.UI_PRIORITY, delegate(Resource res, int listCount, int index) { totalNum++; }); }