/// <summary> /// 查找依赖 /// </summary> private bool FindDependencies() { string[] ds = AssetBundleDependencies.Instance.GetDependencies(m_bundleName); int length = ds.Length; m_dependencies = new BundleRes[length]; for (int i = 0; i < length; i++) { m_dependencies[i] = ResPool.Get <BundleRes>(ResData.AllocateBundle(ds[i]), true); } return(length > 0); }
/// <summary> /// 搜索bundle /// </summary> private bool SearchAssetBundle() { if (m_assetBundle == null) { m_bundleRes = ResPool.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 = ResPool.Get <BundleRes>(ResData.AllocateBundle(bundleName), true); if (!m_only) { m_assetRes = ResPool.Get <AssetRes>(ResData.AllocateAsset(assetName, bundleName), true); } m_listener = listener; }
public void Init(string assetName, ResNotificationListener listener) { m_mainRes = ResPool.Get <ResourceRes>(ResData.AllocateResource(assetName), true); m_listener = listener; }
void OnEnable() { Target = target as ResPool; poolList = Target.GetPoolList(); }