void InternalUnloadAssets(List <string> assetPaths, bool unloadUnusedAssets, Action completed)
 {
     Working = true;
     assetPaths.UnloadAssets(m_LoadedAssets, m_LoadedAssetBundles, m_AssetBundleManifest, unloadUnusedAssets, completed);
     Working = false;
     ActionSequence.Dequeue();
 }
        void InternalUnloadAllAssets(bool unloadUnusedAssets, Action completed)
        {
            Working = true;
            foreach (var kvp in m_LoadedAssets)
            {
                kvp.Value.Release(true);
                AssetRefer.Unspawn(kvp.Value);
            }
            foreach (var kvp in m_LoadedAssetBundles)
            {
                kvp.Value.Release(true);
                AssetBundleRefer.Unspawn(kvp.Value);
            }
            m_LoadedAssets.Clear();
            m_LoadedAssetBundles.Clear();

            if (unloadUnusedAssets)
            {
                Resources.UnloadUnusedAssets();
            }

            if (completed != null)
            {
                completed.Invoke();
            }

            Working = false;
            ActionSequence.Dequeue();
        }
 void InternalLoadAssets <T>() where T : Object
 {
     Working            = true;
     m_LoadingTasks     = m_CachedLoadingTasks.Dequeue();
     m_LoadingCallback  = m_CachedLoadingCallbacks.Dequeue();
     m_WorkingCoroutine = m_LoadingTasks.LoadAssetsAsync <T>(m_LoadedAssets, m_LoadedAssetBundles, x => {
         Action <List <T> > completed = (Action <List <T> >)m_LoadingCallback;
         if (completed != null)
         {
             completed.Invoke(x);
         }
         m_LoadingTasks     = null;
         m_LoadingCallback  = null;
         m_WorkingCoroutine = null;
         Working            = false;
         ActionSequence.Dequeue();
     }, true).StartCoroutine();
 }