Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Issue with file size?

Discussion in 'Editor & General Support' started by Sleepyheadd, Jun 5, 2022.

  1. Sleepyheadd

    Sleepyheadd

    Joined:
    Jul 8, 2018
    Posts:
    4
    I've been looking into how to reduce the file size of my game (which is a pretty tiny game designed for a website or mobile app). The total of all my assets looks to be 6.4 mb but my build size is 75 mb for some reason and I can't find an explanation for why. How do I fix this?

    Build Report
    Uncompressed usage by category (Percentages based on user generated assets only):
    Textures 5.7 mb 89.4%
    Meshes 0.0 kb 0.0%
    Animations 0.0 kb 0.0%
    Sounds 0.0 kb 0.0%
    Shaders 32.2 kb 0.5%
    Other Assets 441.0 kb 6.7%
    Levels 0.0 kb 0.0%
    Scripts 177.3 kb 2.7%
    Included DLLs 0.0 kb 0.0%
    File headers 44.6 kb 0.7%
    Total User Assets 6.4 mb 100.0%
    Complete build size 74.9 mb
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,956
    Steps to success:

    - understand what you can and cannot control

    - make a blank project with a single blank scene

    - build that to the desired target

    How big is it?

    The difference between a blank project's final build size and your project is how big your final assets are. That will be the size you can control.

    You may get some additional space by checking this out:

    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122
     
  3. Sleepyheadd

    Sleepyheadd

    Joined:
    Jul 8, 2018
    Posts:
    4
    Ahh that's what I figured, thank you! I'll check these out and see how far I can get it down before it becomes essential Unity data. I knew that Unity was going to have a lot of extra features built into the final game build that I wouldn't need but I wasn't sure how to access them, so I appreciate the links!