/// <summary> /// 查找依赖 /// </summary> private bool FindDependencies() { string[] ds = AssetBundleDependencies.GetDependencies(m_bundleName); int length = ds.Length; m_dependencies = new BundleRes[length]; for (int i = 0; i < length; i++) { m_dependencies[i] = ResPoolSystem.Get <BundleRes>(ResData.AllocateBundle(ds[i]), true); } return(length > 0); }
/// <summary> /// 搜索bundle /// </summary> private bool SearchAssetBundle() { if (m_assetBundle == null) { m_bundleRes = ResPoolSystem.Get <BundleRes>(ResData.AllocateBundle(bundleName)); if (m_bundleRes != null) { m_assetBundle = m_bundleRes.assetBundle; } } return(m_assetBundle != null); }
public void Init(string bundleName, string assetName, ResNotificationListener listener) { m_only = string.IsNullOrEmpty(assetName); m_bundleRes = ResPoolSystem.Get <BundleRes>(ResData.AllocateBundle(bundleName), true); if (!m_only) { m_assetRes = ResPoolSystem.Get <AssetRes>(ResData.AllocateAsset(assetName, bundleName), true); } m_listener = listener; }