Search Unity

Simple android puzzle game size is 22mb. What I am doing wrong? [With some research data]

Discussion in 'Editor & General Support' started by curiousAmit, May 17, 2019.

  1. curiousAmit

    curiousAmit

    Joined:
    May 15, 2015
    Posts:
    8
    Don't know which tags its comes under! User retention is low as app size is too high for simple graphics and music (both of these are optimized).
    On building for android getting 13 mb included dll and my apk also contains some System.xml.dll which is only used in Editor folder. This is build report report

    Textures 3.7 mb 14.8%
    Meshes 0.0 kb 0.0%
    Animations 0.0 kb 0.0%
    Sounds 1.5 mb 6.0%
    Shaders 231.7 kb 0.9%
    Other Assets 1.3 mb 5.1%
    Levels 379.7 kb 1.5%
    Scripts 3.0 mb 12.0%
    Included DLLs 13.1 mb 52.0%
    File headers 2.0 mb 7.8%
    Total User Assets 25.3 mb 100.0%
    Complete build size 113.3 mb



    These are packages used in my game so here are stats for blank project with imported packages and tweaked building settings.

    Stats [Note, empty project is not tested and is for only apk size.]
    -----------+-----------------------------------------------------------------------------+
    Size | Actions description for apk
    -----------+-----------------------------------------------------------------------------+

    26.46 | Empty Build
    26.46 | Empty Build with scene (same as previous)
    15.90 | Changed to armv7 only
    10.63 | Switched to mono stripping at high
    10.76 | Added DoTween(free)
    12.40 | Added EasyMobilePro
    12.40 | Added srcipt with EasyMobilePro referenced in it
    12.40 | EasyMobilePro - some services turned on like savedgames,ads,iap
    13.60 | Added DoozyUi (2.92 something)
    15.85 | Added Firebase Analytics
    16.01 | Added Firebase Crashlytics
    16.28 | Turned mono stripping to low (as in original project only low was working)
    15.42 | EasymobilePro delete scripts of unused modules like notification etc
    16.36 | Added google admob
    16.08 | Added proguard
    15.56 | Switched to il2cpp High
    15.20 | Deleted DoozyUi editor folder
    12.42 | Deleted Firebase,admob,dotween editor folder
    12.41 | Deleted EasyMobilePro multiplayer folder
    ----------+-----------------------------------------------------------------------------+

    Guys! can you help me?
     
  2. tng2903

    tng2903

    Joined:
    Apr 8, 2013
    Posts:
    41
    maybe you left some thing in Resource, streamingasset or plugins folder? these magic folder of Unity are usually source of file size problem.
    Try search in the project window to discover those wicked magic folder hidden in deep tree
     
  3. curiousAmit

    curiousAmit

    Joined:
    May 15, 2015
    Posts:
    8
    In the table near end, why removing editor folder decreases by apk size. I will check those magic folders too.

     
  4. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    One reason could be because that's where the build postprocessors for those plugins live, which would mean that by removing them you will no longer get all the required assets for those plugins bundled into your .apk.

    Also, I keep getting constantly surprised by the random things that keep pulling System.Xml in as an annoying indirect dependency...
     
    curiousAmit likes this.