- Feb 7, 2020
- 132
- 478
I'm sure some of you have already seen those unity games that goes from 500 mb to 5GB when extracted from the .rar file.
And I can assure you it's not because winrar is doing some sort of magic there.
There are quite a few unity games that the devs either doesn't know how or refuses to compress the gamefiles even if there is no loss of data after decompressing(lossless compression).
You can easily identify that when the basic winrar compression does this magic resizing.
Unfortunatly unity does not make it easy to edit the game files like rpgmaker games.
There is a few installer options that compress the data for you to install but that doesn't solve the problem of size when the game is playable.
Here is an easy fix for those cases. This is a windows only workaround but I'm sure there must be similar alternative for linux and mac.
There are 2 ways to compress the files and being able to play the game at the same time.
And you are done.
Windows explorer will still show the same size but if you right click the properties windows it'll show the "size in disk" size which is actually used to calculate the HD free space.
I prefer compressing only the files that have the image/audio which are the ones that usually will save most space. They are usually the 'resources.assets.resS' files.
In theory this will make the files load a bit slower when you run the game but I personally didn't see any difference at all. Maybe on a 3d AAA game this could be a problem.
The basic usage is: "compact.exe" /C /EXE:LZX PathToFileToCompress
The disadvantage of using compact instead of the windows properties one is that there is no indication the file is compressed unless you right click it and check the "size in disk"
The way to show the files compression is execute : "compact.exe" on a terminal.
I've made a few batch scripts to make it easier.
Just drag and drop the file you want into the batch file and it'll compress/decompress it.
Drag files to "compact LZX.bat" to compress
Drag files to "compact_decompress.bat" to decompress if the are
Execute "compact show.bat" will display a console listing all files inside and their compression status (which compression used and ratio)
---------------------
tl;dr
Use the batch script and drag&drop the big files onto "compact LZX.bat"
It might take a little bit depending on the size of the file.
And I can assure you it's not because winrar is doing some sort of magic there.
There are quite a few unity games that the devs either doesn't know how or refuses to compress the gamefiles even if there is no loss of data after decompressing(lossless compression).
You can easily identify that when the basic winrar compression does this magic resizing.
Unfortunatly unity does not make it easy to edit the game files like rpgmaker games.
There is a few installer options that compress the data for you to install but that doesn't solve the problem of size when the game is playable.
Here is an easy fix for those cases. This is a windows only workaround but I'm sure there must be similar alternative for linux and mac.
There are 2 ways to compress the files and being able to play the game at the same time.
- First way (okay compression, a bit worst than winrar):
And you are done.
Windows explorer will still show the same size but if you right click the properties windows it'll show the "size in disk" size which is actually used to calculate the HD free space.
I prefer compressing only the files that have the image/audio which are the ones that usually will save most space. They are usually the 'resources.assets.resS' files.
In theory this will make the files load a bit slower when you run the game but I personally didn't see any difference at all. Maybe on a 3d AAA game this could be a problem.
- Second way (great compression, same mpression you get from winrar):
The basic usage is: "compact.exe" /C /EXE:LZX PathToFileToCompress
The disadvantage of using compact instead of the windows properties one is that there is no indication the file is compressed unless you right click it and check the "size in disk"
The way to show the files compression is execute : "compact.exe" on a terminal.
I've made a few batch scripts to make it easier.
Just drag and drop the file you want into the batch file and it'll compress/decompress it.
Drag files to "compact LZX.bat" to compress
Drag files to "compact_decompress.bat" to decompress if the are
Execute "compact show.bat" will display a console listing all files inside and their compression status (which compression used and ratio)
---------------------
tl;dr
Use the batch script and drag&drop the big files onto "compact LZX.bat"
It might take a little bit depending on the size of the file.