Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Why does my Tiny project build release at 2MB?

Discussion in 'Project Tiny' started by mattbrandmm, Mar 21, 2019.

  1. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    I followed this tutorial:


    Basically, it's one sprite on the screen, an input script to move the sprite around. Very very small and simple. When I build it, the development folder is 5.65MB and the release folder is 2.06MB. I thought that the advantage of Project Tiny was to have very small build sizes - I remember Unity reps saying 100kb.

    Am I not configuring things correctly?
     
  2. Zoelovezle

    Zoelovezle

    Joined:
    Aug 7, 2015
    Posts:
    54
    Use the compression method. Most popular is gzip :) which is fastest and is supported by most of the browsers by default for decompression when headers are configured correctly.
    I tried LZMA, xz, bzip2 and gzip. Out of em all gave me almost the same size compression which was about 1mb to 1.2mb from 4.6mb initial unity release build.
     
  3. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    @Zoelovezle for Project Tiny? I don't see compression method...I know that exists in the regular Unity build settings.
     
  4. Zoelovezle

    Zoelovezle

    Joined:
    Aug 7, 2015
    Posts:
    54
    You have to do it after you build the project
     
  5. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    Ah that makes sense. Thanks for the info so far.

    Any tips on how to use gzip to compress a Project Tiny build? Do you need to go through each directory and compress any compressible files?
     
    Last edited: Mar 21, 2019
  6. Zoelovezle

    Zoelovezle

    Joined:
    Aug 7, 2015
    Posts:
    54
  7. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    Great thank you so much!
     
  8. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Also make sure you have all the modules your project is not using turned off in the modules section

    And make sure the images your using sizes are set correctly in the import settings
     
  9. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    OK thanks.

    So I'm trying something different - I'm building a blank project with only the Utiny.HTML Module checked. And that builds release (pre compression) at 1.91MB. That's with no graphics or anything.

    Is the normal? For a blank project? Even with compression like gzip, the best-case scenario is probably 70% reduction, which would get it down to about 0.5MB. I know Unity has been using stats like 100kb. How is that even possible if a blank project builds to 1.91MB?
     
  10. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    122
    sniffle63 likes this.
  11. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90