- Home /
Texture broken in build but normal in edit mode
Hi everyone,
All of my texture is normal in edit mode but part of my texture were broken when I execute my project.
I use Unity2017.1.0 with a 32GB RAM Windows 10 and GTX1080 GPU which has 8G RAM. The total original image size is 18G in total and every texture has set the compress into 1024 . My project and everything went well before I tried to change part of my texture (0.8G) from 1024 to 2048. In the edit mode, all the texture is fine. But after I built with PC, some of the texture was broken(even those texture that the size didn't change) such as the figure below.
In the Profiler, my project used 7.13G (Texture Memory) and 7.54G (Total Allocated) before I change the texture size. After I change 0.8G texture into 4096, my project used 8.3G (Texture Memory) and 8.6G (Total Allocated).
Does someone knows how to fix this problem?
Answer by Casiell · Aug 16, 2018 at 01:04 PM
Unity has a 4GB limit on assets in build.
You can load textures from outside, not include them in build. One way is to use AssetBundles.
Thanks for your advice.
I've tried to use AssetBundle to handle part of my 4$$anonymous$$ texture, it really works. But when I set all my 4k texture into AssetBundle, it fails when building the AssetBundle.
The error is shown as below: Asserting failed: Assertion failed on expression: 'size >> 31 == 0' UnityEditor.BuildPipeline:BuildAssetBundles(String,BuildAssetBundleOpitons,BuildTarget) PS. I use BuildAssetBundleOpitons.None
Is there any limit size of an AssetBundle package?
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Why are my texture sizes so large in my build? 3 Answers
Small game, huge size? 1 Answer
Shuriken Billboarded Texture Gone in Built Executable 1 Answer
Texture DXT5 regression in 2019.1? 0 Answers