Beispiel #1
0
        public override bool Update()
        {
            if (m_Request != null)
            {
                return(false);
            }

            LoadedAssetBundle bundle = JABMgr.GetLoadedAssetBundle(m_AssetBundleName, out m_DownloadingError);

            if (bundle != null)
            {
                if (m_IsAdditive)
                {
                    m_Request = SceneManager.LoadSceneAsync(m_LevelName, LoadSceneMode.Additive);
                }
                else
                {
                    m_Request = SceneManager.LoadSceneAsync(m_LevelName, LoadSceneMode.Single);
                }
                return(false);
            }
            else
            {
                return(true);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if more Update calls are required.
        /// </summary>
        /// <returns></returns>
        public override bool Update()
        {
            if (m_Request != null)
            {
                return(false);
            }

            LoadedAssetBundle bundle = JABMgr.GetLoadedAssetBundle(m_AssetBundleName, out m_DownloadingError);

            if (bundle != null)
            {
                ///@TODO: When asset bundle download fails this throws an exception...
                m_Request = bundle.m_AssetBundle.LoadAssetAsync(m_AssetName, m_Type);
                return(false);
            }
            else
            {
                return(true);
            }
        }