protected void Success(AssetBundle bundle) { Log.Trace("[ilib-abloader] load success {0}.", Name); IsRunning = false; m_Hander.OnComplete(this); var bundleRef = m_Owner.CreateBundleRef(Name, bundle); bundleRef.AddRef(); OnSuccess(bundleRef); bundleRef.RemoveRef(); m_LoadOperator?.CompleteLoad(this); }
void OnComplete() { Log.Trace("[ilib-abloader] complete web request {0}", Url); m_Hander?.OnComplete(this); if (m_WebRequest == null) { return; } var error = m_WebRequest.error; if (string.IsNullOrEmpty(error)) { Success(); m_WebRequest.Dispose(); } else { try { m_WebRequest.Dispose(); } finally { Fail(new DownloadException(error, m_WebRequest)); } } m_WebRequest = null; }