protected void CompleteOperation(IAssetBundleResourceHandler resourceHandler, AssetBundle assetBundle)
 {
     if (assetBundle == null)
     {
         CompleteOperation(resourceHandler, "Assetbundle failed to load.");
         return;
     }
     Debug.LogFormat("[{0}.{1}] {2} Success={3} hasCallback={4}", resourceHandler.GetType().Name, nameof(CompleteOperation), Path.GetFileNameWithoutExtension(m_ProvideHandle.Location.InternalId), assetBundle != null, m_CompletedCallback != null);
     m_CompletedCallback?.Invoke(resourceHandler, assetBundle, null);
 }
Exemplo n.º 2
0
 internal void OnCompleted(IAssetBundleResourceHandler handler, AssetBundle assetBundle, Exception exception)
 {
     Debug.LogFormat("[{0}.{1}] path={2} module={3} success={4}", nameof(ModularAssetBundleResource),
                     nameof(OnCompleted), Path.GetFileNameWithoutExtension(m_ProvideHandle.Location.InternalId),
                     handler.GetType().Name, assetBundle != null);
     m_ActiveHandler      = handler;
     m_AssetBundle        = assetBundle;
     m_OperationException = exception;
     if (m_IsSynchronous)
     {
         return;
     }
     m_ProvideHandle.Complete(this, m_AssetBundle != null, m_OperationException);
 }
 protected void CompleteOperation(IAssetBundleResourceHandler resourceHandler, string exception)
 {
     Debug.LogFormat("[{0}.{1}] {2} Error={3}", resourceHandler.GetType().Name, nameof(CompleteOperation), Path.GetFileNameWithoutExtension(m_ProvideHandle.Location.InternalId), exception);
     m_CompletedCallback?.Invoke(resourceHandler, null, new Exception(exception));
 }