public void LoadContainer(string name, Action <BundleContainerRef> onSuccess, Action <Exception> onFail) { BundleContainer container; if (m_Container.TryGetValue(name, out container)) { container.SetEvent(onSuccess, onFail); return; } Log.Trace("[ilib-abloader] start load container : {0}", name); string[] deps; var length = m_BundleData.GetAllDepends(name, out deps); container = new BundleContainer(name, length, this); container.SetEvent(onSuccess, onFail); Action <BundleRef> onLoad = container.OnLoad; Action <Exception> onLoadFail = container.OnFail; Request(name, m_BundleData.GetHash(name), m_BundleData.GetCRC(name), onLoad, onLoadFail); for (int i = 0; i < length; i++) { Request(deps[i], m_BundleData.GetHash(deps[i]), m_BundleData.GetCRC(deps[i]), onLoad, onLoadFail); } }
internal void UnloadContainer(BundleContainer container) { m_Container.Remove(container.Name); }