Example #1
0
        public void LateTick()
        {
            bool manifestLoaded = loadOperation == null || loadOperation.IsDone();

            if (!manifestLoaded)
            {
                return;
            }

            if (bundlesToLoad.Count == 0)
            {
                tickableManager.RemoveLate(this);
                isInitialized = true;
                OnInitialized(EventArgs.Empty);
                return;
            }

            if (loadingNowBundle != null)
            {
                string error;
                if (AssetBundleManager.GetLoadedAssetBundle(loadingNowBundle, out error) != null)
                {
                    loadingNowBundle = null;
                }
            }

            loadingNowBundle = bundlesToLoad.Dequeue();
            AssetBundleManager.LoadAssetBundle(loadingNowBundle);
        }