I have added some frame animations using prefabs. I instantiate them in runtime. After adding these prefabs. I have the above error when I build it to apk. If I dont build that scene, it’s fine. There are totally around 150 730x730 png inside these prefabs. Of course I already have tons of other textures in other scenes. I need to add even more.
I’m running Unity 4.1.2 on Windows 7 with 4GB ram. How to solve this? Thanks.
First of all, your windows is a 64bit version ? If you are using a 32bit version don’t search in other way the problem is just here in front of your eyes.
If you are using a windows 64bit, there is other thing that can provoke this :
Because when you have an image with those dimensions (730730) with png you have an alpha channel used whereas with a jpg it’s only 3.
If you have 4 channels in used, with a true color texture, your datas are uncompressed so your picture take more space in memory. With 150 sprites and 730730px you must reach something like 500Mo (only for this animation) + your others textures.
Add to this size the Unity process, and I can supposed your Unity proccess used 600Mo roughly.
So only with those 2 parameters I already used 1.2Go and if you have windows with 32bit it won’t work. I don’t compute the size with all your others textures but I must be higher than this I think.
If it’s to build and apk (so an Android game), I can say already one thing it’s really too much. Try to decrease your texture size. You really need to have this size ?