I’m trying to solve this problem:
~https://discussions.unity.com/t/bug-4gb-limit-to-textures-in-standalone-build/645929~
When I run the game in editor everything is fine. But when I build a standalone build all of the textures are corrupted. They are all spliced together and the emission is turned up so high that it’s blinding if bloom is turned on. And every cube map is particularly corrupted, just a mess of color noise, regardless of whether they are being used for reflection maps or skyboxes.
Based on my research this is because unity doesn’t support more than 4gb of texture data. However, the documentation is saying limitation can be avoided by using Asset bundles, since each asset bundle can support up to 4gb worth of texture data. So if I split the textures into separate bundles I should be able to build with more than 4gb worth of texture data, so long as no one bundle goes over that 4gb limit. Or at least that was my understanding.
I have the asset bundles split up pretty small and manually checking them I’m sure none of them are more than 4gb total, uncompressed. And yet the textures are still corrupted in the stand alone build.
I have packed all of our large textures into asset bundles, built bundles (placing them in the streaming assets folder so they just ship with the game), then re-built the game. But the issue persists.
I’m struggling to understand why this is still happening.
At first I thought it was because the main menu scene contains references to meshes and materials that use those textures. But I tried deleting those objects from the scene, saving, and re-building and the issue still persists.
I’m wondering if Unity is duplicating the texture assets even though I’m telling them to be placed in bundles.
Based on the documentation here:~https://docs.unity3d.com/Manual/AssetBundles-Dependencies.html#:~:text=To%20avoid%20data%20duplication%2C%20assign,automatically%20during%20the%20build%20process~.
To avoid data duplication, assign the Material and its referenced Assets to its own modulesmaterials AssetBundle. You can also tag the Material only, because the Texture dependency is also included in the AssetBundle automatically during the build process.
So do I just have to pack the materials alongside the textures?
Do I have to pack every level and everything contained in that level into an asset bundle?
Or the materials, textures and meshes? Prefabs?
Or can unity literally not handle loading more than 4gb worth of textures at any given time, regardless of whether they are split up into multiple bundles?
I struggle to believe that last one since it seems like a catastrophic limitation for modern games, but I’m really not clear on why this is still happening after all my large textures have been packed into bundles.
The only thing I know for certain works is deleting the texture folders for the new assets we added to the game recently, which is what caused this to start happening in the first place. So I know for a fact that this is related to the textures, but that’s obviously not a real solution.