private void NotifyAll(ContentDownloadState state, ContentDownloadError error = ContentDownloadError.None) { foreach (ContentDownloadItem contentDownloadItem in DownloadQueue.ToArray()) { contentDownloadItem.NotifyDownloadStateChange(state, error); } }
public AbstractDownloaderYieldInstruction(MonoBehaviour monoBehaviour) { m_MonoBehaviour = null; m_Coroutine = null; m_IsDone = false; m_IsDisposed = false; m_DownloadState = ContentDownloadState.Unknown; m_DownloadError = ContentDownloadError.None; this.ProgressReport = new ProgressReport(); }
public void Dispose() { if (m_MonoBehaviour != null && m_Coroutine != null) { m_DownloadState = ContentDownloadState.Unknown; m_DownloadError = ContentDownloadError.None; m_MonoBehaviour.StopCoroutine(m_Coroutine); Complete(); } ReleaseAssetBundles(); m_IsDisposed = true; }
internal void NotifyDownloadStateChange(ContentDownloadState state, ContentDownloadError error = ContentDownloadError.None) { if (this.State != state || this.Error != error) { string submoduleName = "Unknown"; if (this.ContentInfo != null) { submoduleName = this.ContentInfo.SubmoduleName; } Debug.LogFormat("ContentDownloader->State changed for {0} : State = {1}, Error = {2}", submoduleName, state.ToString(), error.ToString()); this.State = state; this.Error = error; if (this.OnDownloadStateChange != null) { this.OnDownloadStateChange(this); } } }
private void NotifyAndDequeueAll(ContentDownloadState state, ContentDownloadError error = ContentDownloadError.None) { NotifyAll(state, error); DownloadQueue.Clear(); }