Problem with too large sharedassets1.assets file in build

Is there a way to change the way unity distributes assets into the sharedassetsX.assets files when making a build? I’m having a problem where one of them is apparently too large. I get an error saying they should be less than 4gb, while one of them is 5.01gb and when I try to run the build I just get a black screen. I’m thinking it’s packing all of my lightmaps into one file. Is there a way to change this?

What’s also weird is that I didn’t do any changes that I can think of that could cause this, the problem just suddenly appeared after I did some changes to what layers some objects were on in some scenes. I Didn’t increase lightmap resolutions, bake them or anything. Previously it worked fine. I have tried rolling back to a revision from version control that I’m certain has worked in the past and it’s not working now either.

Also checking the build report it seems 85.2% (nearly 15gb) of the build is “file headers”. In the documentation it says:
The File headers mentioned in the list are not Assets - they are actually the extra data that is added to “raw” Asset files to store references and settings. The headers normally make very little difference to Asset size, but the value might be large if you have numerous large Assets in the Resources folder.

However I have only a few small files in resources folders from some plugins I’m using. What’s going on there? Are realtime lightmaps counted as file headers there as well, because I can’t find the LightingData files anywhere in the build report?

1 Like

Just remembered, I did try making a webgl build and switched platforms, then switched back to standalone between the last working build and the current situation. I wonder if that has anything to do with it.