1 (edited by GriffinSTatum 2021-12-06 17:22:24)

Topic: [SOLVED] Building game crashes

Currently the build process will get stuck on “Build Player Data” for a period of time before ultimately crashing. I know the source of the issue but I don’t know the best way to solve it.

It crashes once I run out of memory. You would think upgrading my ram would do the trick, but I upgraded it to 64GB and it still crashes. The issue seems to come from my characters. I duplicated my project and deleted my characters, and it compiled completely fine.

The thing I’m unsure about is whether it’s due to the size on disk of the sprites, or the shear amount of sprites. All the sprites together take up around 50GB, but the number of individual png sprites are around 185,000.

Before I go and shrink every single image to conserve on space, do you think this is due to the size of the files or the number of files? Any help would be appreciated!

Share

Thumbs up Thumbs down

Re: [SOLVED] Building game crashes

Maybe both? But regardless I think you need to remove(or move to another location outside the project folder) some sprites you know you're not using in the game because I bet you're not using all those 50Gb files.

Share

Thumbs up Thumbs down

3 (edited by GriffinSTatum 2021-11-15 10:57:44)

Re: [SOLVED] Building game crashes

xHerox wrote:

Maybe both? But regardless I think you need to remove(or move to another location outside the project folder) some sprites you know you're not using in the game because I bet you're not using all those 50Gb files.

I’ll look to see if there are any sprites I’m not using, although I have around 75 variations of characters(counting costumes) which are doubled to account for left and right facing. There should be little to no excess, but I have had to remake some animations so I wouldn’t be surprised if there are some extra files that aren’t being used any longer.

Also, out of the 50GB, I have some problem characters that take up 17GB, 10GB, 5GB and 4GB which I plan on reducing, but even removing those characters still crashes when building.

Share

Thumbs up Thumbs down

4 (edited by FreedTerror 2021-11-16 13:29:29)

Re: [SOLVED] Building game crashes

I recall running into this issue. I think there is a 4gb limit for builds currently? https://forum.unity.com/threads/bug-4gb … ld.441116/
not sure if that would cause the building to crash tho

Share

Thumbs up Thumbs down

5 (edited by GriffinSTatum 2021-12-06 17:24:09)

Re: [SOLVED] Building game crashes

FreedTerror wrote:

I recall running into this issue. I think there is a 4gb limit for builds currently? https://forum.unity.com/threads/bug-4gb … ld.441116/
not sure if that would cause the building to crash tho

Thanks for this. While it wasn’t the outright solution to the issue, it led my two person dev team to our answer.

For the majority of the characters, we moved each animation into sprite sheets, taking the number of sprites down from 180,000 to a “measly” 20,000. There were some characters that have big sprites and we didn’t want to compromise sprite quality, if we had compressed all the animations the number would sit around 12,500. The full build size currently is around 40GB, still fairly large, but overall I think better than what was going to be the case beforehand.

We used a program called TexturePacker which allows you to relatively easily make sprite sheets with custom pivot points per sprite. Definitely streamlined the process to a manageable timetable, we only added a couple weeks to our dev calendar. Would definitely recommend using TexturePacker if you want a simple and effective way of making sprite sheets(which imports already split in Unity).

Share

Thumbs up Thumbs down