Exemple #1
0
        protected override void LoadMainAsyncRequest(AssetBundleRequest request)
        {
            this._BundleMainObject = request.asset;

            if (!this.isABMode)
            {
                GameSceneCtr.LoadScene(this.loadingpkg.BundleName);
                this._FinishAndRelease();
            }
            else
            {
                ///需要异步预实例化
                this._PushTaskAndExcute(this.loadingpkg, GameSceneCtr.LoadSceneAsync(this.loadingpkg.BundleName));
            }
        }
        protected override void OnFinish()
        {
            if (BundleConfig.Bundle_Log)
            {
                LogMgr.LogFormat("Scene Load Asset {0} Finished at {1}", this.LoadResPath, GameSyncCtr.mIns.RenderFrameCount);
            }

            this.InvokeHandler(true);

            string[] sceneSplit = this.loadingpkg.BundleName.Split('.');
            string   scename    = this.loadingpkg.BundleName;

            if (sceneSplit.Length > 1)
            {
                scename = sceneSplit[0];
            }

            GameSceneCtr.LoadScene(scename);
            this.Dispose();
        }