[Addressables] Prevent Asset Duplication in Non-Addressable Scenes
Solution
Unity 2019.4.x - Unity 6.3.x
Published 30 days ago
When an addressable asset is referenced by an object within a non-addressable Scene, asset duplication occurs at runtime. This results in the Memory Profiler showing two instances of the same asset: one loaded via the Addressables system and another duplication instance originating from the Scene object dependencies.
To prevent duplication of assets, ensure that any Scene referencing them is also configured as an addressable Scene, enabling consistent asset loading from bundles.
Asset duplication occurs because non-addressable Scenes are built into the player’s local data and include all dependencies physically within the Scene data block. When the Addressables system later loads the same asset, a second instance is created in memory, resulting in duplication.
To resolve this duplication:
- Open the
Addressables Groupswindow via Window > Asset Management > Addressables > Groups. - Locate your
Sceneasset in theProjectwindow. - Drag the
Sceneasset into anAddressable Groupor check the Addressable checkbox in theInspector. - Rebuild the
Addressablescontent via Build > New Build > Default Build Script.
Additional Tips
- Use the
AddressablesAnalyze tool to detect duplication issues. - Always load these
ScenesusingAddressables.LoadSceneAsyncinstead ofSceneManager.LoadSceneto prevent duplication. - If a
Scenemust remain non-addressable, move shared assets into aResourcesfolder, though this rarely stops duplication withAddressables.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.