Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Unused packages included in final binary?

Discussion in 'Package Manager' started by daranguiz_sprite, Nov 13, 2019.

  1. daranguiz_sprite

    daranguiz_sprite

    Joined:
    May 9, 2018
    Posts:
    2
    Hey all,

    We're doing some license verification for our app, and we're trying to figure out exactly which packages are included in our final binary. We assumed that if a package was unused (no "using" statements, no references in code), it wouldn't be included in the final binary, but we've noticed that switching off "unused" packages sometimes causes a change in the final binary size. It's kind of bizarre — even for clearly unused packages like the Cloth, Terrain, etc (we're developing a 2D game), sometimes the binary size changes.

    Is there any way to determine with certainty which packages end up being included in the final binary? Because this deals with licenses and attribution notices, we're trying to be as thorough as possible. Also, we're compiling down to iOS/Android if that helps.

    Thanks!
     
    Last edited: Nov 13, 2019
  2. manu73

    manu73

    Unity Technologies

    Joined:
    Aug 22, 2014
    Posts:
    68
    Hi @daranguiz_sprite,

    I'm checking with team if there's such a tool or API to determine which modules (I think you refer to them) will be part of your build.
    But AFAIK, modules need to be manually disabled.

    Regards,
    EmmanuelH.
     
  3. daranguiz_sprite

    daranguiz_sprite

    Joined:
    May 9, 2018
    Posts:
    2
  4. manu73

    manu73

    Unity Technologies

    Joined:
    Aug 22, 2014
    Posts:
    68