Esempio n. 1
0
        public BundledProvider(AssetInfo assetInfo) : base(assetInfo)
        {
            OwnerBundle = AssetSystem.CreateOwnerAssetBundleLoader(assetInfo);
            OwnerBundle.Reference();
            OwnerBundle.AddProvider(this);

            var dependBundles = AssetSystem.CreateDependAssetBundleLoaders(assetInfo);

            DependBundleGroup = new DependAssetBundleGroup(dependBundles);
            DependBundleGroup.Reference();
        }
Esempio n. 2
0
        public override void Destroy()
        {
            base.Destroy();

            // 释放资源包
            if (OwnerBundle != null)
            {
                OwnerBundle.Release();
                OwnerBundle = null;
            }
            if (DependBundleGroup != null)
            {
                DependBundleGroup.Release();
                DependBundleGroup = null;
            }
        }