2
\$\begingroup\$

I want to know the right and good way to compress my game when I build it. I made 3 levels with all my enemies there. The size of the game file 3GB in the desktop. When I build my game I get 1GB. All textures quality 1024*1024. But in unity I get 2048 on the settings window? do I need to change anything?

Image import settings

Game statistics

Is there any thing wrong? Also, some of my enemies have more that 10 materials. Is it OK or not?

What do you suggest or advise me to do?

\$\endgroup\$
6
  • \$\begingroup\$ The max setting doesn't mean it will be set to 2k, it means that if the texture exceeds 2k it will stay at 2k. Not everything in your project is build into the final product. Only things that are used per scene. Your texture also shows that it's at 0.7mb you sure you aren't putting things in there that are bloated? \$\endgroup\$
    – Sidar
    Oct 9 '17 at 16:40
  • 1
    \$\begingroup\$ It's not clear what you're asking about here. If you're looking to reduce build size, there are already questions about that. If you're wondering about the image sizes, you'll need to show us your build settings for each platform - as Sidar notes the texture importer only gives an upper bound. If you're wondering about runtime performance, you'll need to be specific about what problem you've observed and what your profiling indicates about its cause. \$\endgroup\$
    – DMGregory
    Oct 9 '17 at 16:42
  • \$\begingroup\$ Are you sure that your textures are the prime offenders? Have you checked? \$\endgroup\$
    – Philipp
    Oct 9 '17 at 17:00
  • \$\begingroup\$ Sidar -> Thank you for you're respond and infromation. Yes, it shows 0.7mb in unity but in my desktop it shows 133kb !!? I don't know what its mean ? // DMGregory -> reduce the build size correctly for PC,MAC and LUNIX OS. I put image for texture because i thought it's the problem. this second image showing details maybe you notes something that causing the problem of the size. I'm not talking here about the performance. I'm giving more details so may you point at the reason of this big size of my game. // Philipp -> NO, I'm just wondering. \$\endgroup\$
    – user43474
    Oct 9 '17 at 18:32
  • 2
    \$\begingroup\$ When replying to user, use the @ before their names, they'll get a notification that someone replied to them (and the number of users you can ping is limited by in a single comment so you may have to reply more than once). Also, why didn't you use stack's imgur service to upload your images? This will prevent linkrot, and my employer from firing me because your other site shows too many revealing ad photos. \$\endgroup\$
    – Vaillancourt
    Oct 9 '17 at 23:53
1
\$\begingroup\$

Overall those settings look fine, the Max Size is only there to be an upper limit. It won't make the texture larger it's only doing as it says and setting it as a max size. For example, I make almost every texture as 4096x4096 but then set the max size to 2048x2048. This resizes my large textures to the smaller size in the actual build, but your 1024x1024 textures will remain that size because it's not hitting the limits.

Materials are fine, many models have multiple materials.

If you are concerned about build size I would check for asset packages you've imported. You may have something from the asset store that is larger than you expected. As others have mentioned, if you don't use an asset it doesn't get packed into the game so it's already doing what it can.

Some additional info like target platform etc would help.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Thank you so much for all this information. I will check all my asset packages. I'm using only particle packages if they causing this big size I will delete them. I'm targeting PC,MAC and Linux platforms. \$\endgroup\$
    – user43474
    Oct 25 '17 at 18:19
  • 1
    \$\begingroup\$ @user43474 in that case, I'm not sure how much content is in the game but usually desktop gamers are fine with a project running about 1gb. Once the project is built you can zip it up and unity games compress really well. I'd bet it will go down to about 600mb after you zip it. \$\endgroup\$
    – Tyler C
    Oct 25 '17 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.