Unused packages included in final binary?

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!

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.

Hi @manu73 , thanks so much!

Hi!

A build report tool for size analysis is available as a package in Unity. It’s in preview, so you have to make sure you have checked “Show preview packages” in PackageManager UI toolbar Advanced menu.
It’s name is “Build Report Inspector”.

(In case you are using Unity version lower than 2018.1, there’s an AssetStore version: Build Report Inspector for Unity | Utilities Tools | Unity Asset Store)

Regards,
EmmanuelH