/// <summary> /// 加载bundleInfo /// </summary> /// <param name="buffer"></param> /// <returns></returns> public tagBundleInfo LoadBundleInfo(byte[] buffer) { tagBundleInfo bundleInfo = new tagBundleInfo(); bundleInfo.Init(buffer); return(bundleInfo); }
/// <summary> /// 加载bundleInfo /// </summary> /// <param name="strPath"></param> /// <returns></returns> private tagBundleInfo _LoadBundleInfo(string strPath, string strAssetName) { // 加载并初始化bundleInfo包 AssetBundle assetBundle = AssetBundle.LoadFromFile(strPath + strAssetName); if (assetBundle != null) { TextAsset text = assetBundle.LoadAsset <TextAsset>(strAssetName); if (text != null) { tagBundleInfo bundleInfo = new tagBundleInfo(); bundleInfo.Init(text.bytes); assetBundle.Unload(true); return(bundleInfo); } } Debug.LogError("加载bundleInfo失败,path:" + strPath); return(null); }