Exemple #1
0
        public override AssetBundleLoading LoadAssetBundle(string name)
        {
            string url = _assetBundlePathPrefix + name;

            var operation = OperationFactory.CreateAssetBundleSyncLoading(name, url);

            operation.SetContent(AssetBundle.LoadFromFile(url));

            return(operation);
        }
        public override AssetBundleLoading LoadAssetBundle(string name)
        {
            string url = _assetBundlePathPrefix + name;

            // [PPAN] Read MD5 AssetBundles
            var operation = OperationFactory.CreateAssetBundleSyncLoading(name, url);

            if (!string.IsNullOrEmpty(useMD5AB))
            {
                string strMD5 = ReadMD5FromXL(name);
                if (string.IsNullOrEmpty(strMD5))
                {
                    Debug.LogError(name + " has not MD5 file");
                }
                string strURLwithMD5 = string.Format("{0}{1}_{2}", _assetBundlePathPrefix, name, strMD5);
                //Debug.Log("SyncWarehouse strURLwithMD5 = " + strURLwithMD5);
                url = strURLwithMD5;
            }

            operation.SetContent(AssetBundle.LoadFromFile(url));
            return(operation);
        }