Forum rules - please read before posting.

Can't create Build because too big...?!?!

Hello everybody!
I know this is mainly Unity related, but I wonder if Adventure Creator is affecting somehow my build...

Unity = 2018.3.10f1
AC = 1.67.1

Basically when creating my build, I'm getting the error "Serialized file size exceeds maximum... etc etc" getting over 4GB and therefore not able to do a proper build. I'm using Windows, my destination drive is an exFat.

This is the full error message:
Serialized file size of 4.18 GB (4489356884 bytes) exceeds maximum. File name: 'H:/RWPY game/UnityGame/RWPY - game/Temp/StagingArea/Data/resources.assets'. Serialized files over 4.00 GB (4294967295 bytes) cannot be loaded by the player. Some likely ways to reduce this are utilizing asset bundles, re-balancing asset locations, or limiting their serialized size e.g. limiting the maximum texture sizes.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This happened lately, after I imported into my project a series of PNG sequences for random "walkers" that will appear in my game (they are not really NPCs, but people walking around... a dozen of them). The game is in 2D and they have 8 directions each, so it's a huge amount of PNG squences... but still... I should be able to build my game, right? They aren't that heavy...

Unity suggest to reduce quality and size of the sprites, so I set all of them (the "walkers" ones) to "low quality" and max res to 1024 (instead of 2048), but I still get that error message...

I noticed from the log that the "file headers" is taking a HUGE amount of space and I don't get why... Have a look:

Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 2167.4 mb 32.5%
Meshes 0.6 kb 0.0%
Animations 319.5 kb 0.0%
Sounds 160.2 mb 2.4%
Shaders 104.0 kb 0.0%
Other Assets 49.4 mb 0.7%
Levels 3.6 mb 0.1%
Scripts 1.9 mb 0.0%
Included DLLs 13.2 mb 0.2%
File headers 4281.6 mb 64.1%
Total User Assets 6677.7 mb 100.0%

Googling around I've found out it might be related with "Static" prefab, but my prefabs aren't static.
Is it possible that something from AC is causing the file headers to be so huge?!

What could it be? How can I solve? Thanks a lot!


    After googling around, I've partially solved by closing the project, deleting the "Library" folder, opening the project again (it takes a while to re-build the Library, but then it's lighter and smoother).
    Now I can Build without errors, but my game folder is still huge 6.5Gb (before it was about 1Gb). Can a series of sprites (10 characters with 30 frames walking animation X8 directions each, resolution 512x512) be so heavy!? Increasing my build from 1Gb to 6.5Gb?!?! Or is there something wrong?
    P.S. the PNG sequences of all the walkers on my hard drive take 400mb disk space...

  • Build Report
    Uncompressed usage by category (Percentages based on user generated assets only):
    Textures 6416.7 mb 96.1%
    Meshes 197.7 kb 0.0%
    Animations 2.6 mb 0.0%
    Sounds 160.2 mb 2.4%
    Shaders 327.7 kb 0.0%
    Other Assets 78.8 mb 1.2%
    Levels 3.7 mb 0.1%
    Scripts 1.9 mb 0.0%
    Included DLLs 13.2 mb 0.2%
    File headers 475.4 kb 0.0%
    Total User Assets 6677.9 mb 100.0%

  • Hello, I don't know if it can help you. Usually I create sprite atlases (ex. a atlas for all the walking directions of a single character), and I see it helps both with the weight of the build and with the loading speed.

  • Hello ciro_camera, thanks a lot!
    I've been optimizing a lot today and I'm down to 1.3gb now. That is not bad and not causing building problems anymore. But for 6 2D scenes is still a very big size (I guess).
    I will try with sprite atlases but I thought Unity was doing it automatically thanks to the "sprite packer" ?! Any suggestions?

  • I think if you used "sprite packer" is very good. The problem, I think, is due to how many animations you have. Actually I'm working on my project and I have 40 scenes and the build weights about 3.5 GB. I have the main character with the standard animations (Walk, Idle, Take, Use, Talk (8 directions)) plus 15 custom animation, and other 10 NPC with (4-5 animations for each one). My opinion is that the scenes are not so heavy (or are heavy if inside them there are a lot of animations). But it's the opinion I had working on my project: maybe Chris or other members can confirm or give more suggestions.

  • edited April 2019

    Yeah at the moment I'm working on a Demo...
    In my case I've 2 main swappable characters (4 standard animations + custom ones).
    7 NPCs (with just 1-2 directions, 5-6 set of animations).
    10 Walkers (just walking in 8 directions).
    6 scenes (but with animation within the scenes as well, such as rain, cars, etc).
    1 animated map.

    So far after some optimization I'm down to 1.2gb.
    90% of the build space is about textures... And the atlases are very heavy.
    For example the atlas of one of my main characters talking is 200MB (a series of 4096x4096 images in low quality, but NOT crunched). 200mb just for 1 character talking...!
    I'll try to crunch, but I don't want to loose lot of quality...

  • ok, you're making my own tests. Without steal space to your discussion, I open a new one sharing my tests and my impressions on how Unity/AC manage build weight and speed. In the new discussion I'mm make more precise but, for examples I test both sprite packer and sprite atlas for main character's animations: sprite packer seems improving the speed in switching between scenes, but consuming more memory, while sprite atlases consume low memory but the switching between scenes seems to be a little bit slow. The weight of both the build seems to be similar (with textures in RGBA Compressed DXT5 without "Use Crunch Compressions" active and sprite atlases with the same format). I test also RGBA Crunched DXT5 (at the moment only for main character's textures in sprite packer mode): in this case I see a speed increase at first start, fast switching between scenes, build weight reduce about 25% (from 3,2 GB to 2,65 GB), no difference in quality textures.

  • Thanks, looking forward for your tests!

  • Your first post mentioned "resources.assets". I'm not sure if this is a reference to the Resources folder, but be careful not to place your textures etc in a folder by that name.

    Otherwise, yes this is a general Unity issue. The usual rules of texture compression, square textures, etc, all apply - see Unity's documentation on graphical optimisation here.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!