0
votes

I'm new to Unity. Now I have an image folder which includes around 749 .jpg images. I want to create an assetbundle of this folder. In the game, I want to load these .jpg iamges one by one and set it as Texture2D.

Thanks in advance.

2

2 Answers

-1
votes

You can find full guide on Unity Blog(how to make and load asset bundles) as it said:

AssetBundles are files created in the Unity editor during edit-time, which can be used later by a build of a project at run-time. AssetBundles can contain asset files such as models, materials, textures and scenes. AssetBundles cannot contain scripts. (Read This)

0
votes

After downloading asset bundle either by WWW or WWW.LoadFromCacheOrDownload do this:

WWW www = new WWW(url);//download aaset
                AssetBundle assetBundle = www.assetBundle;
                AssetBundleRequest request = assetBundle.LoadAssetAsync<Image>("nameOfImage");
                Texture texture = request.asset as Textute;

put this code under IEnumerator and yeild return www;