Exemplo n.º 1
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);
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
        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;
        }