assetbundle

How to get AssetBundleManifest from AssetBundle in Unity3D

旧城冷巷雨未停 提交于 2019-12-24 12:06:41
问题 I have read AssetBundles Document and also tried to get the manifest from the specific assetbundle like the document. I want to get character's manifest but the manifest from the code returns null. I've changed the AssetBundleManifest at line 5 to character or character.manifest and it is also null: private IEnumerator LoadAssetBundleManifest() { string assetBundlePath = Application.dataPath + "/../AssetBundles/Android/character"; AssetBundle assetBundle = AssetBundle.LoadFromFile

UnityWebRequest.SendWebRequest doens't send on mobile

烈酒焚心 提交于 2019-12-23 16:37:30
问题 I am downloading Assetbundles using the UnitywebRequest method from HTTPS, however the UnityWebRequest.SendWebRequest seems to take its sweet time to actually start receiving any data. public static IEnumerator DownloadMenuAssetBundle(string fileName) { string path = Path.Combine(Globals.Platform, fileName); UnityWebRequest www = new UnityWebRequest(FileManager.RequestFile(path));//this returns the complete url to the bundle e.g https://mywebsite.com/unity/myBundle www.downloadHandler = new

Get Hash128 from AssetBundle for the Caching.IsVersionCached function

隐身守侯 提交于 2019-12-21 21:31:13
问题 I want to know AssetBundle already in cache. This is usually done with the Caching.IsVersionCached function. The Caching.IsVersionCached(string url, int version) function overload is no longer supported in Unity 2017.1 . Unity 2017.3 is recommends that I use the Caching.IsVersionCached(string url, Hash128 hash) overload. I don't know what the Hash128 is and how to obtain and use it. What is Hash128 used for an how do you obtain it from the AssetBundle? Thank you for your answer. But I can't

Yii2 disable asset of a vendor module

﹥>﹥吖頭↗ 提交于 2019-12-20 01:46:18
问题 I have installed yii2-admin module, located in /vendor/mdmsoft/yii2-admin but I don't want it to load its own asset bundle. It there any way to disable this module asset bundle? 回答1: Yes, it's possible and even mentioned in official docs here. One way to do it is through application config: return [ // ... 'components' => [ 'assetManager' => [ 'bundles' => [ 'mdm\admin\AdminAsset' => false, ], ], ], ]; Another way - during runtime through component: \Yii::$app->assetManager->bundles['mdm

【热更新】AssetBundle

落花浮王杯 提交于 2019-12-19 16:45:43
* AssetBundle:简称AB包 * 用处:1.ab是一个压缩包:包含模型,贴图,预制体,声音,甚至整个场景,可以在游戏运行的时候加载 * 2.它自身保存着互相依赖的关系 * 3.压缩包:LZMA和LZ4压缩算法,减少包的体积大小,更快的进行网络传输 * 4.把一些可以下载的内容放在AB包里面,可以减少安装包的大小 * * * ab包: * 1.存在于硬盘上的文件,这个压缩包我们可以认为是一个文件夹,然后里面包含了多个文件 * 2.文件分为两类:serialized和resource file(序列化文件和源文件) * serialized file:资源被打碎后放在一个对象中,最后统一被写进一个单独的文件(只有一个)(只有当程序运行后实例化才可以看得到) * resource file:某些二进制资源(图片,声音)被单独保存,方便快速加载 * * AB包使用流程: * 1.指定资源的ab属性(在unity里面创建一个物体后就可以选择添加属性(xx/yy:xx:生成的目录,yy:名字)) * 2.创建ab包 * 3.上传ab包(打包出来的ab包上传到服务器) * 4.加载ab包里面的资源 * 如果直接放进包里:缺点:包体积过大,不能热更 xx.ipa xx.apk using System . Collections ; using System . Collections

How to download an assetbundle into the app folder for IOS/Android and get the required model from it?

半世苍凉 提交于 2019-12-13 17:25:31
问题 Around 5 models were given the name 'kitchen' and around 3 models the name 'furniture' in AssetBundle.Then I created them into the local path using the following code. [MenuItem("Assets/Build Home Assets")] static void BuildKitchenAssets() { BuildPipeline.BuildAssetBundles("/Users/ar/Desktop/HomeBundles",BuildAssetBundleOptions.ChunkBasedCompression,BuildTarget.iOS); } Later I uploaded these files into a server.The folder structure is given in the image below. Now I am looking to download the

优化

非 Y 不嫁゛ 提交于 2019-12-13 12:41:37
WeTest 导读 做了大概半年多VR应用了,VR由于双眼double渲染的原因,对性能的优化要求比较高,在项目的进展过程中,总结了一些关于移动平台上Unity3D的性能优化经验,供分享。 一、移动平台硬件架构 移动平台无论是Android 还是 IOS 用的都是统一内存架构,GPU和CPU共享一个物理内存,通常我们有“显存”和“内存”两种叫法,可以认为是这块物理内存的所有者不同,当这段映射到cpu,就是通常意义上的内存;当映射到gpu,就是通常意义上的显存。并且同一段物理内存同一时刻只会映射到一个device。 即使是在同一物理内存上 ,之前的openGL ES规范中CPU和GPU之间的内存是不能共享的,vertex和texture的buffer是需要拷贝的。后面出来的vulkan 与IOS的metal 可以共享内存。 了解了移动平台的硬件架构,就知道了 1)CPU 2) 带宽 3) GPU 4) 内存 都有可能成为移动平台3D应用性能瓶颈。 二、移动平台3D应用的画面渲染过程 1、CPU通过调用绘制命令(称为一次Draw Call)来告诉GPU开始进行一个渲染过程的。一个Draw Call命令会指向本次绘制需要渲染的信息,这些信息包括:顶点数据、纹理数据、shader参数(光照模型、法线方向、光照方向等)等,简单地说就 画什么,用什么画,怎么画。 2、GPU接收到Draw

How do I get an array/list filled with all the image paths I loaded as assets in Flutter?

℡╲_俬逩灬. 提交于 2019-12-11 18:26:55
问题 I want to know if there is a way (with or without pubspec.yaml asset list) to read a directory where images will be stored, and create an array with all the paths to each image, so I can go through the array (say, with a FOR ) and create a gallery of photos. This with the purpose of being able to change, remove or add images from the directory without worrying about the paths being coded in assets. I've read that I can use AssetBundle or RootBundle for this but I cant find any example doing

Huge world loading/unloading in unity webgl using asset bundles

南楼画角 提交于 2019-12-11 03:07:55
问题 I have a very large 3D world/Environment which I have divided into 1000 x 1000 m (1km) tiles . Made assetbundles of all tiles and currently there are only 5 asset bundles (Expected to grow significantly maybe around 1000 asset bundles). Loading\unloading these asset bundles , i am calculating the distance of my player/camera with the tile and then calling for load or unload. Please see below simple script (Loading tiles based on distance): public Vector3 tileSize; public int maxDistance;

Unity WebGL asset bundle memory is not releasing

核能气质少年 提交于 2019-12-08 17:01:30
问题 I am loading and Caching Asset Bundles using below function in unity webgl : IEnumerator DownloadAndCacheAB(string assetName) { // Wait for the Caching system to be ready while (!Caching.ready) yield return null; // Load the AssetBundle file from Cache if it exists with the same version or download and store it in the cache using (WWW www = WWW.LoadFromCacheOrDownload(finalUrl, 1)) { yield return www; if (www.error != null) { Debug.Log("WWW download had an error:" + www.error); } AssetBundle