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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to exclude unnecessary dlls

Discussion in 'Editor & General Support' started by jl008, Dec 21, 2017.

  1. jl008

    jl008

    Joined:
    Jan 31, 2013
    Posts:
    25
    I'm building for android a simple 2d games. I can't speak for all dlls. But I'm pretty sure I don't need:

    • Timeline.dll
    • AnimationModule.dll
    • AIModule.dll
    • TerrainModule.dll
    • VRModule.dll
    • GameCenterModule.dll
    • ARModule.dll
    • TilemapModule.dll
    • UnityAnalyticsModule.dll
    • ClothModule.dll
    • VechiclesModule.dll
    • SpriteMaskModule.dll
    • WindModule.dll
    • TerrainPhysicsModule.dll
    • and so on.
    Is there a way to exclude this and other libs from the build? I din't find such setting in Unity

    Version 2017.2.0p4 (0c3a6a294e34) Personal
    Thu, 30 Nov 2017 11:25:41 GMT
    Branch: 2017.2/patch-release

    Or is it available only in Pro version? Or not at all?

    Thanks,
     

    Attached Files:

    • 1.png
      1.png
      File size:
      136.5 KB
      Views:
      958
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,448
  3. jl008

    jl008

    Joined:
    Jan 31, 2013
    Posts:
    25
    @Peter77 Thank you for the reply!

    I've tried that option. It removed all dlls from Managed folder and replaces it with something else. However, the build takes forever to finish and the APK file actually increased by 5Mb.

    There are similar options available for Mono build
    • Strip Assemblies - reduces by 1Mb but breaks some 3rd party plugins (such as native sharing)
    • Strip byte code - same as above.
    • Use micro mscorelib - same as above.
    I also found this:
    https://stackoverflow.com/questions...ecessary-dlls-from-my-build/47254728#47254728

    Seems like you can hack you way through this. But would be better to use unity approved way. Again, I don't know maybe there is such a feature in Pro version.
     
  4. Jhon_JQ

    Jhon_JQ

    Joined:
    Jul 24, 2018
    Posts:
    5
    it also confused me, i wana remove such as Web\ai\AR\VR etc.....