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
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Is it possible to reduce build file size under 2MB?

Discussion in 'Project Tiny' started by TanChoi, May 28, 2019.

  1. TanChoi

    TanChoi

    Joined:
    Jun 14, 2016
    Posts:
    15
    Hi guys. Now i'm working on playable ads.

    Some ad networks restrict to final build size under 2MB.
    I has tested the empty project. Empty project's build size was near 2MB(almost runtime.js)

    Is it possible to reduce build file size under 2MB?
     
  2. Jinjer88

    Jinjer88

    Joined:
    May 17, 2017
    Posts:
    12
    In my case unchecking "Minify Javascript" and "Embedded Assets" in Project Settings > Tiny actually reduced the project size by half.
    remove any unnecessary modules from the project in Modules tab (Like Physics2D) if you don't use them in your project.
    Try to use Sprite Atlas for all your textures. But you need to uncheck Allow Rotation and Tight Packing since they are not supported in tiny mode right now. (Maybe it will be available later)

    I was able to get a project down to around 800kb with most of the modules checked.
     
  3. masenbka

    masenbka

    Joined:
    Apr 25, 2018
    Posts:
    2
    I make the same and size of my project now is higher) I think problem in runtime.js
     
    TanChoi likes this.
  4. Robin_GNY

    Robin_GNY

    Joined:
    Jan 7, 2016
    Posts:
    1
    Hi guys. I have exactly the same problem.
    I' don't understand how the sample project ''MatchThree" reduce their size to 1.8MB, because when I build this project the size was near 9MB.

    They said :
    'This is an example of an instant 2D game created with Project Tiny that has an initial compressed size of 969 KB compressed data (162 KB engine, 199 KB game code, 597 KB of art). An additional 861 KB in audio files loads in as the game plays totaling 1.8 MB for the full project.'
    How are we supposed to do that?

    Moreover, if we uncheck "Embedded Assets" the build doesn't work on facebook playable ad.
     
    TanChoi likes this.
  5. Jinjer88

    Jinjer88

    Joined:
    May 17, 2017
    Posts:
    12
    I don't know about playable ads, but I have managed to export the match 3 project to facebook messenger with exactly 1.8 mb size.
    The 1.8 mb size is the compressed size not the full project files. It means you need to compress it somehow on your server, but platforms like facebook instant games compress it for you.
    As I said above unchecking "Minify Javascript" brings the size down to around 4 mb. when you zip the files, it's 1.8mb.
     
    TanChoi likes this.