unity使用WebRequest 方式加载assetbundle


string uri ="";
UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(uri);

yield return request.SendWebRequest();
//AssetBundle ab = DownloadHandlerAssetBundle.GetContent(request);
AssetBundle ab = DownloadHandlerAssetBundle.GetContent(request);
Debug.Log(ab);
GameObject sp = ab.LoadAsset<GameObject>(filename);
Instantiate(sp);

使用AssetBundles-Browser-master可以傻瓜式打包

将材质需要的纹理 和材质本身打到同一个包下 

可以忽略依赖文件 只要下载一个包就行了

 

 只需要sphere这一个文件即可


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM