コード例 #1
0
        public static void Create(string assetURL, Action <AssetBundle> callback, int version, bool isAlwaysCallback = false)
        {
            GameObject   obj    = new GameObject("BundlePacket");
            BundlePacket bundle = obj.AddComponent <BundlePacket>();

            bundle.StartLoadFromCacheOrDownload(assetURL, callback, version, isAlwaysCallback);
        }
コード例 #2
0
        public static void LoadFromCacheOrDownload(string assetName, int bundleVersion, Action <string, AssetBundle> callback, bool isAlwaysCallback = false)
        {
            string assetURL = CloudGoodsSettings.BundlesUrl + assetName + ".unity3d";

            int version = bundleVersion;

            BundlePacket.Create(assetURL, bundle =>
            {
                callback(assetName, bundle);
            }, version, isAlwaysCallback);
        }