Asset duplication happens when Unity recursively follows direct references to make sure that all required objects are included in the build. Assets and scenesA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary aren’t shared between different builds, so the same content might be duplicated both in the Player build and a content-only build that you make using AssetBundles or Addressables. For small objects this might not be a problem, but for large assets such as textures or meshes this can lead to large build sizes.
To avoid or minimize asset duplication, you can minimize the amount of content that goes into the Player build and put all the content into AssetBundles or Addressables instead.
To create a minimal Player build, include only a single starting scene containing a MonoBehavior that bootstraps the rest of the content loading using the AssetBundle or Addressable APIs. You should also avoid putting any assets into Resources folders that are also referenced by a content-only build. The output of the AssetBundle or Addressable builds can be shipped with the Player build, using the StreamingAssets folder, or hosted on a CDN.
Assets can be duplicated in AssetBundles if the same asset is referenced from different AssetBundles. If that asset isn’t explicitly assigned to an AssetBundle then Unity copies its content inside each AssetBundle that references it. To prevent this from happening, make sure that shared assets are explicitly assigned to an AssetBundle. For more information, refer to Handling dependencies between AssetBundles. The Build Report Inspector is also a useful tool to identify duplication in AssetBundles.
Addressables has the same issue with duplication of implicitly referenced assets. In that case, you can avoid it by assigning shared assets to a group. The Addressables Analyze tool helps diagnose and resolve asset duplication.