Exemplo n.º 1
0
        internal void LoadComplete(AssetBundleLoader loader)
        {
            _requestRemain++;
            _currentLoadQueue.Remove(loader);

            if (onProgress != null)
            {
                _progress.loader   = loader;
                _progress.complete = _progress.total - _currentLoadQueue.Count;
                this.onProgress(_progress);
            }

            if (_currentLoadQueue.Count == 0 && _nonCompleteLoaderSet.Count == 0)
            {
                _isCurrentLoading = false;
            }
            else
            {
                this.CheckRequestList();
            }
        }
Exemplo n.º 2
0
        void LoadDepends()
        {
            if (depLoaders == null)
            {
                depLoaders = new AssetBundleLoader[bundleData.dependencies.Length];
                for (int i = 0; i < bundleData.dependencies.Length; i++)
                {
                    depLoaders[i] = bundleManager.CreateLoader(bundleData.dependencies[i]);
                }
            }

            _currentLoadingDepCount = 0;
            for (int i = 0; i < depLoaders.Length; i++)
            {
                AssetBundleLoader depLoader = depLoaders[i];
                if (depLoader.state != LoadState.State_Error && depLoader.state != LoadState.State_Complete)
                {
                    _currentLoadingDepCount++;
                    depLoader.onComplete += OnDepComplete;
                    depLoader.Load();
                }
            }
            this.CheckDepComplete();
        }
Exemplo n.º 3
0
 internal void LoadError(AssetBundleLoader loader)
 {
     this.LoadComplete(loader);
 }