Build is including assets I didn't think were referenced anywhere. How can I track those down?

I have a large project with a lot of assets in it, but for testing purposes I’ve created a single, extremely simple scene which contains just a player model/animation set, and one (simple) environment prefab. I made a build containing only this scene, and looked in the editor.log to see what assets were included.

It’s including a lot of stuff that doesn’t appear in the scene and isn’t a dependency of anything in the scene. I’m seeing other prefabs, models, animations, textures… you name it, it’s in there. It’s not including the entire project, but it does seem to think there are more things referenced in the test scene than I think there are, by a couple orders of magnitude.

The extra assets are not contained in any Resources folder (we don’t use the Resources folder in this project anyway), so they would not be being loaded for that reason. I can’t figure out why Unity thinks they need to be included.

Is there any way to track these references down, so I can either eliminate them, or at least explain their inclusion?

Build Report Tool would help you track them down, it’s $10 on the Asset Store.

You can try reading the build report xml manually but for $10 it provides a much better interface and lots of cool functionality.

Build Report Tool is worth the $10. There isn’t anything like it.

I think there’s something called Dependency Checker for free on the asset store. That might be what you’re looking for.