Пример #1
0
        public void Unload(ulong hashID)
        {
            int bundleID = ResourceMainfest.GetBundleID(hashID);

            if (bundleID != -1)
            {
                _UnloadAssetBundleDataWithDepend(bundleID);
            }
        }
Пример #2
0
        public AssetBundle Load(ulong hashID)
        {
            int bundleID = ResourceMainfest.GetBundleID(hashID);

            if (bundleID == -1)
            {
                return(null);
            }

            AssetBundleData assetBundleData = _LoadAssetBundleDataWithDepend(bundleID);

            return(assetBundleData.GetAssetBundle());
        }
Пример #3
0
        public void UnloadUnusedAssets(List <ulong> resHashs)
        {
            for (int i = 0; i < resHashs.Count; ++i)
            {
                int bundleID = ResourceMainfest.GetBundleID(resHashs[i]);
                if (bundleID != -1)
                {
                    _UpdateBundleRef(bundleID, true);
                }
            }

            _UnloadUnloadingAssetBundle(false);

            for (int i = 0; i < resHashs.Count; ++i)
            {
                int bundleID = ResourceMainfest.GetBundleID(resHashs[i]);
                if (bundleID != -1)
                {
                    _UpdateBundleRef(bundleID, false);
                }
            }
        }