public void LoadAbort(int id) { var handler = AssetLoadHandlerManager.GetInstance().GetLoadHandler(id); if (handler != null) { handler.loader?.StopLoad(handler); } }
protected AssetLoadHandler GetOrCreateHandler(string path) { //先判断正作加载的队列中是否已经正在加载 AssetLoadHandler handler = null; if (m_loadingMap != null && m_loadingMap.TryGetValue(path, out handler)) { return(handler); } handler = AssetLoadHandlerManager.GetInstance().GetOrCreateHandler(); handler.timeoutChecker.UpdateTick(); handler.path = path.ToLower(); return(handler); }
protected override void OnRelease() { //递归释放 if (m_children != null && m_children.Count > 0) { for (int i = m_children.Count - 1; i >= 0; i--) { var handler = m_children[i]; handler.m_parents?.Remove(this); handler.Release(); } } //TODO:这里进行释放操作 AssetLoadHandlerManager.GetInstance().RecycleHandler(this); }