コード例 #1
0
        public AssetBundleResult GetABResult()
        {
            AssetBundleResult result = new AssetBundleResult(this._BundleRef, this._BundleMainObject, this.PreParedGameObject, this.LoaderInsObject, this.LoadResPath);

            result.SceneAsyncResult = this._AsyncOpation as SceneOperation;
            return(result);
        }
コード例 #2
0
ファイル: SpriteAtlas.cs プロジェクト: zwwl0801/RvoProject
        private void LoadDone(bool ret, AssetBundleResult result)
        {
            if (ret)
            {
                bundle = result.MainObject;
                if (bundle == null)
                {
                    throw new FrameWorkResMissingException(string.Format("Missing {0}", result.LoadPath));
                }

                if (SprKeys == null)
                {
                    SprKeys = new List <string>(bundle.GetAllAssetNames());
                }
                //else
                //{
                //    SprKeys.Clear();
                //    SprKeys.AddRange(bundle.GetAllAssetNames());
                //}

                while (this.imageLoaders.Count > 0)
                {
                    KeyValuePair <string, Image> kv = this.imageLoaders.Dequeue();
                    AfterDone(kv.Value, kv.Key);
                }
            }

            if (cacheCbk != null)
            {
                cacheCbk(ret, this.bundle);
                cacheCbk = null;
            }
        }
コード例 #3
0
        private void AsyncDone(bool ret, AssetBundleResult result)
        {
            if (ret)
            {
                AbstractParams p      = null;
                Transform      Parent = null;
                while (this.RemoveLoading(result.LoadPath, out p, out Parent))
                {
                    GameObject instance = result.SimpleInstance();
                    GameUI     ui       = BindToCanvas(instance, Parent, p);

                    if (ui != null)
                    {
                        ui.InitLua(result.LoadPath);
                    }

                    AddtoContioner(ui, Parent);
                    CallUI(ui, p);
                }
            }
        }